Lucene - Searching Classes
Searching process is again one of the core functionality provided by Lucene. It's flow is similar to that of indexing process. Basic search of lucene can be made using following classes which can also be termed as foundation classes for all search related operations.
Following is the list of commonly used classes during searching process.
|Sr. No.||Class & Description|
This class act as a core component which reads/searches indexes created after indexing process. It takes directory instance pointing to the location containing the indexes.
This class is the lowest unit of searching. It is similar to Field in indexing process.
Query is an abstract class and contains various utility methods and is the parent of all types of queries that lucene uses during search process.
TermQuery is the most commonly used query object and is the foundation of many complex queries that lucene can make use of.
TopDocs points to the top N search results which matches the search criteria. It is simple container of pointers to point to documents which are output of search result.