Interface Searchable
The interface for search implementations.
Searchable is the abstract network protocol for searching. Implementations provide search over a single index, over multiple indices, and over indices on remote servers.
Queries, filters and sort criteria are designed to be compact so that they may be efficiently passed to a remote index, with only the top-scoring hits being returned, rather than every matching hit.
NOTE: this interface is kept public for convenience. Since it is not expected to be implemented directly, it may be changed unexpectedly between releases.
Namespace:
Assembly: Lucene.Net.NetCore.dll
Syntax
public interface Searchable : IDisposable
Properties
Name | Description |
---|---|
MaxDoc | Expert: Returns one greater than the largest possible document number. Called by search code to compute term weights. |
Methods
Name | Description |
---|---|
Close() | Frees resources associated with this Searcher. Be careful not to call this method while you are still using objects that reference this searchable |
Doc(Int32) | Expert: Returns the stored fields of document |
Doc(Int32, FieldSelector) | Get the Documentat the NOTE: If the underlying Reader (more specifically, the underlying |
DocFreq(Term) | Expert: Returns the number of documents containing |
DocFreqs(Term[]) | Expert: For each term in the terms array, calculates the number of
documents containing |
Explain(Weight, Int32) | Expert: low-level implementation method
Returns an Explanation that describes how This is intended to be used in developing Similarity implementations, and, for good performance, should not be displayed with every hit. Computing an explanation is as expensive as executing the query over the entire index. Applications should call Explain(Query, Int32). |
Rewrite(Query) | Expert: called to re-write queries into primitive queries. |
Search(Weight, Filter, Collector) | Lower-level search API.
Collect(Int32) is called for every document. Applications should only use this if they need all of the matching documents. The high-level search API (Search(Query, Int32)) is usually more efficient, as it skips non-high-scoring hits. |
Search(Weight, Filter, Int32) | Expert: Low-level search implementation. Finds the top Applications should usually call Search(Query, Int32) or Search(Query, Filter, Int32) instead. |
Search(Weight, Filter, Int32, Sort) | Expert: Low-level search implementation with arbitrary sorting. Finds
the top Applications should usually call Search(Query, Filter, Int32, Sort) instead. |