public class ShardSearchingTestBase.NodeState.ShardIndexSearcher extends IndexSearcher
IndexSearcher.LeafSlice
Modifier and Type | Field and Description |
---|---|
int |
myNodeID |
long[] |
nodeVersions |
leafContexts, readerContext
Constructor and Description |
---|
ShardIndexSearcher(long[] nodeVersions,
IndexReader localReader,
int nodeID) |
Modifier and Type | Method and Description |
---|---|
CollectionStatistics |
collectionStatistics(java.lang.String field)
Returns
CollectionStatistics for a 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)
Expert: called to re-write queries into primitive queries.
|
TopDocs |
search(Query query,
int numHits)
Finds the top
n
hits for query . |
TopFieldDocs |
search(Query query,
int numHits,
Sort sort)
Search implementation with arbitrary sorting.
|
TopDocs |
searchAfter(ScoreDoc after,
Query query,
int numHits)
Finds the top
n
hits for query where all results are after a previous
result (after ). |
TermStatistics |
termStatistics(Term term,
TermContext context)
Returns
TermStatistics for a term. |
count, createNormalizedWeight, createWeight, doc, doc, doc, explain, explain, getDefaultQueryCache, getDefaultQueryCachingPolicy, getDefaultSimilarity, getIndexReader, getQueryCache, getQueryCachingPolicy, getSimilarity, getSlices, getTopReaderContext, search, search, search, search, searchAfter, searchAfter, setDefaultQueryCache, setDefaultQueryCachingPolicy, setQueryCache, setQueryCachingPolicy, setSimilarity, slices, toString
public ShardIndexSearcher(long[] nodeVersions, IndexReader localReader, int nodeID)
public Query rewrite(Query original) throws java.io.IOException
IndexSearcher
rewrite
in class IndexSearcher
java.io.IOException
public TermStatistics termStatistics(Term term, TermContext context) throws java.io.IOException
IndexSearcher
TermStatistics
for a term.
This can be overridden for example, to return a term's statistics
across a distributed collection.termStatistics
in class IndexSearcher
java.io.IOException
public CollectionStatistics collectionStatistics(java.lang.String field) throws java.io.IOException
IndexSearcher
CollectionStatistics
for a field.
This can be overridden for example, to return a field's statistics
across a distributed collection.collectionStatistics
in class IndexSearcher
java.io.IOException
public TopDocs search(Query query, int numHits) throws java.io.IOException
IndexSearcher
n
hits for query
.search
in class IndexSearcher
java.io.IOException
public TopDocs localSearch(Query query, int numHits) throws java.io.IOException
java.io.IOException
public TopDocs searchAfter(ScoreDoc after, Query query, int numHits) throws java.io.IOException
IndexSearcher
n
hits for query
where all results are after a previous
result (after
).
By passing the bottom result from a previous page as after
,
this method can be used for efficient 'deep-paging' across potentially
large result sets.
searchAfter
in class IndexSearcher
java.io.IOException
public TopDocs localSearchAfter(ScoreDoc after, Query query, int numHits) throws java.io.IOException
java.io.IOException
public TopFieldDocs search(Query query, int numHits, Sort sort) throws java.io.IOException
IndexSearcher
search
in class IndexSearcher
query
- The query to search fornumHits
- Return only the top n resultssort
- The Sort
objectSort
instancejava.io.IOException
- if there is a low-level I/O errorpublic TopFieldDocs localSearch(Query query, int numHits, Sort sort) throws java.io.IOException
java.io.IOException
Copyright © 2000–2019 The Apache Software Foundation. All rights reserved.