org.apache.lucene.search

## Class ShardSearchingTestBase.NodeState.ShardIndexSearcher

- java.lang.Object
- - org.apache.lucene.search.IndexSearcher
  - - org.apache.lucene.search.ShardSearchingTestBase.NodeState.ShardIndexSearcher

- Enclosing class:
    ShardSearchingTestBase.NodeState

      public class ShardSearchingTestBase.NodeState.ShardIndexSearcher
      extends IndexSearcher

  Matches docs in the local shard but scores based on aggregated stats ("mock distributed scoring") from all nodes.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.lucene.search.IndexSearcher

      `IndexSearcher.LeafSlice`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `int` | `myNodeID`
    `long[]` | `nodeVersions`

    - ### Fields inherited from class org.apache.lucene.search.IndexSearcher

      `leafContexts, readerContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ShardIndexSearcher(long[] nodeVersions, IndexReader localReader, int nodeID)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `CollectionStatistics` | `collectionStatistics(String field)`
    `TopDocs` | `localSearch(Query query, int numHits)`
    `TopFieldDocs` | `localSearch(Query query, int numHits, Sort sort)`
    `TopDocs` | `localSearchAfter(ScoreDoc after, Query query, int numHits)`
    `Query` | `rewrite(Query original)`
    `TopDocs` | `search(Query query, int numHits)`
    `TopFieldDocs` | `search(Query query, int numHits, Sort sort)`
    `TopDocs` | `searchAfter(ScoreDoc after, Query query, int numHits)`
    `TermStatistics` | `termStatistics(Term term, int docFreq, long totalTermFreq)`

    - ### Methods inherited from class org.apache.lucene.search.IndexSearcher

      `count, createWeight, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getExecutor, getIndexReader, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTopReaderContext, search, search, search, search, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setQueryCache, setQueryCachingPolicy, setSimilarity, slices, termStatistics, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### nodeVersions

          public final long[] nodeVersions

    - #### myNodeID

          public final int myNodeID

  - ### Constructor Detail

    - #### ShardIndexSearcher

          public ShardIndexSearcher(long[] nodeVersions,
                                    IndexReader localReader,
                                    int nodeID)

  - ### Method Detail

    - #### rewrite

          public Query rewrite(Query original)
                        throws IOException

      Overrides:
        `rewrite` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### termStatistics

          public TermStatistics termStatistics(Term term,
                                               int docFreq,
                                               long totalTermFreq)
                                        throws IOException

      Overrides:
        `termStatistics` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### collectionStatistics

          public CollectionStatistics collectionStatistics(String field)
                                                    throws IOException

      Overrides:
        `collectionStatistics` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### search

          public TopDocs search(Query query,
                                int numHits)
                         throws IOException

      Overrides:
        `search` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### localSearch

          public TopDocs localSearch(Query query,
                                     int numHits)
                              throws IOException

      Throws:
        `IOException`

    - #### searchAfter

          public TopDocs searchAfter(ScoreDoc after,
                                     Query query,
                                     int numHits)
                              throws IOException

      Overrides:
        `searchAfter` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### localSearchAfter

          public TopDocs localSearchAfter(ScoreDoc after,
                                          Query query,
                                          int numHits)
                                   throws IOException

      Throws:
        `IOException`

    - #### search

          public TopFieldDocs search(Query query,
                                     int numHits,
                                     Sort sort)
                              throws IOException

      Overrides:
        `search` in class `IndexSearcher`
      Throws:
        `IOException`

    - #### localSearch

          public TopFieldDocs localSearch(Query query,
                                          int numHits,
                                          Sort sort)
                                   throws IOException

      Throws:
        `IOException`

Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.