📅  最后修改于: 2020-11-12 04:45:43             🧑  作者: Mango
搜索过程再次是Lucene提供的核心功能之一。它的流程类似于索引过程。可以使用以下类对Lucene进行基本搜索,这些类也可以称为所有与搜索相关的操作的基础类。
以下是搜索过程中常用类别的列表。
S.No. | Class & Description |
---|---|
1 | IndexSearcher
This class act as a core component which reads/searches indexes created after the indexing process. It takes directory instance pointing to the location containing the indexes. |
2 | Term
This class is the lowest unit of searching. It is similar to Field in indexing process. |
3 | Query
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. |
4 | TermQuery
TermQuery is the most commonly-used query object and is the foundation of many complex queries that Lucene can make use of. |
5 | TopDocs
TopDocs points to the top N search results which matches the search criteria. It is a simple container of pointers to point to documents which are the output of a search result. |