Example usage for Java org.apache.lucene.search IndexSearcher fields, constructors, methods, implement or subclass
The text is from its open source code.
IndexSearcher(IndexReader r) Creates a searcher searching the provided index. | |
IndexSearcher(IndexReaderContext context) Creates a searcher searching the provided top-level IndexReaderContext . | |
IndexSearcher(IndexReader r, Executor executor) Runs searches for each segment separately, using the provided Executor. | |
IndexSearcher(IndexReaderContext context, Executor executor) Creates a searcher searching the provided top-level IndexReaderContext . |
CollectionStatistics | collectionStatistics(String field) Returns CollectionStatistics for a field, or null if the field does not exist (has no indexed terms) This can be overridden for example, to return a field's statistics across a distributed collection. |
int | count(Query query) Count how many documents match the given query. |
Weight | createWeight(Query query, ScoreMode scoreMode, float boost) Creates a Weight for the given query, potentially adding caching if possible and configured. |
Document | doc(int docID) Sugar for .getIndexReader().document(docID) |
void | doc(int docID, StoredFieldVisitor fieldVisitor) Sugar for .getIndexReader().document(docID, fieldVisitor) |
Document | doc(int docID, Set Sugar for .getIndexReader().document(docID, fieldsToLoad) |
Explanation | explain(Query query, int doc) Returns an Explanation that describes how doc scored against query . |
Explanation | explain(Weight weight, int doc) Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight . |
QueryCache | getDefaultQueryCache() Expert: Get the default QueryCache or null if the cache is disabled. |
QueryCachingPolicy | getDefaultQueryCachingPolicy() Expert: Get the default QueryCachingPolicy . |
IndexReader | getIndexReader() Return the IndexReader this searches. |
QueryCache | getQueryCache() Return the query cache of this IndexSearcher . |
QueryCachingPolicy | getQueryCachingPolicy() Return the query cache of this IndexSearcher . |
Similarity | getSimilarity() Expert: Get the Similarity to use to compute scores. |
IndexReaderContext | getTopReaderContext() Returns this searchers the top-level IndexReaderContext . |
Query | rewrite(Query original) Expert: called to re-write queries into primitive queries. |
TopDocs | search(Query query, int n) Finds the top n hits for query . |
void | search(Query query, Collector results) Lower-level search API. |
T | search(Query query, CollectorManager Lower-level search API. |
TopFieldDocs | search(Query query, int n, Sort sort) Search implementation with arbitrary sorting. |
void | search(List Lower-level search API. |
TopFieldDocs | search(Query query, int n, Sort sort, boolean doDocScores) Search implementation with arbitrary sorting, plus control over whether hit scores and max score should be computed. |
TopDocs | searchAfter(ScoreDoc after, Query query, int numHits) Finds the top n hits for query where all results are after a previous result (after ). |
TopDocs | searchAfter(ScoreDoc after, Query query, int n, Sort sort) Finds the top n hits for query where all results are after a previous result (after ). |
void | setDefaultQueryCachingPolicy(QueryCachingPolicy defaultQueryCachingPolicy) Expert: set the default QueryCachingPolicy instance. |
void | setQueryCache(QueryCache queryCache) Set the QueryCache to use when scores are not needed. |
void | setQueryCachingPolicy(QueryCachingPolicy queryCachingPolicy) Set the QueryCachingPolicy to use for query caching. |
void | setSimilarity(Similarity similarity) Expert: Set the Similarity implementation used by this IndexSearcher. |
TermStatistics | termStatistics(Term term, TermStates context) Returns TermStatistics for a term, or null if the term does not exist. |
String | toString() |