Java org.apache.lucene.search IndexSearcher fields, constructors, methods, implement or subclass

Example usage for Java org.apache.lucene.search IndexSearcher fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.lucene.search IndexSearcher.

The text is from its open source code.

Subclass

org.apache.lucene.search.IndexSearcher has subclasses.
Click this link to see all its subclasses.

Implementation

org.apache.lucene.search.IndexSearcher has the following implementations.
Click this link to see all its implementation.

Constructor

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 .

Method

CollectionStatisticscollectionStatistics(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.
intcount(Query query)
Count how many documents match the given query.
WeightcreateWeight(Query query, ScoreMode scoreMode, float boost)
Creates a Weight for the given query, potentially adding caching if possible and configured.
Documentdoc(int docID)
Sugar for .getIndexReader().document(docID)
voiddoc(int docID, StoredFieldVisitor fieldVisitor)
Sugar for .getIndexReader().document(docID, fieldVisitor)
Documentdoc(int docID, Set fieldsToLoad)
Sugar for .getIndexReader().document(docID, fieldsToLoad)
Explanationexplain(Query query, int doc)
Returns an Explanation that describes how doc scored against query.
Explanationexplain(Weight weight, int doc)
Expert: low-level implementation method Returns an Explanation that describes how doc scored against weight.
QueryCachegetDefaultQueryCache()
Expert: Get the default QueryCache or null if the cache is disabled.
QueryCachingPolicygetDefaultQueryCachingPolicy()
Expert: Get the default QueryCachingPolicy .
IndexReadergetIndexReader()
Return the IndexReader this searches.
QueryCachegetQueryCache()
Return the query cache of this IndexSearcher .
QueryCachingPolicygetQueryCachingPolicy()
Return the query cache of this IndexSearcher .
SimilaritygetSimilarity()
Expert: Get the Similarity to use to compute scores.
IndexReaderContextgetTopReaderContext()
Returns this searchers the top-level IndexReaderContext .
Queryrewrite(Query original)
Expert: called to re-write queries into primitive queries.
TopDocssearch(Query query, int n)
Finds the top n hits for query.
voidsearch(Query query, Collector results)
Lower-level search API.
Tsearch(Query query, CollectorManager collectorManager)
Lower-level search API.
TopFieldDocssearch(Query query, int n, Sort sort)
Search implementation with arbitrary sorting.
voidsearch(List leaves, Weight weight, Collector collector)
Lower-level search API.
TopFieldDocssearch(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.
TopDocssearchAfter(ScoreDoc after, Query query, int numHits)
Finds the top n hits for query where all results are after a previous result (after).
TopDocssearchAfter(ScoreDoc after, Query query, int n, Sort sort)
Finds the top n hits for query where all results are after a previous result (after).
voidsetDefaultQueryCachingPolicy(QueryCachingPolicy defaultQueryCachingPolicy)
Expert: set the default QueryCachingPolicy instance.
voidsetQueryCache(QueryCache queryCache)
Set the QueryCache to use when scores are not needed.
voidsetQueryCachingPolicy(QueryCachingPolicy queryCachingPolicy)
Set the QueryCachingPolicy to use for query caching.
voidsetSimilarity(Similarity similarity)
Expert: Set the Similarity implementation used by this IndexSearcher.
TermStatisticstermStatistics(Term term, TermStates context)
Returns TermStatistics for a term, or null if the term does not exist.
StringtoString()