TermQuery是最常用的查询对象,并且是许多复杂的查询,是lucene可利用的基础。
类声明
以下是org.apache.lucene.search.TermQuery类的声明:
public class TermQuery
   extends Query类构造函数
| S.N. | 构造函数和说明 | 
|---|---|
| 1 | TermQuery(Term t) 构造词条 t 的查询。 | 
类方法
| S.N. | 方法及说明 | 
|---|---|
| 1 | void addDocument(Document doc) 增加了一个文档到该索引 | 
| 2 | Weight createWeight(Searcher searcher) 构造一个适当的权重实现这个查询. | 
| 3 | boolean equals(Object o) 返回true如果o为等于此 | 
| 4 | void extractTerms(Set<Term> terms) 增加了在此查询设置条件发生的所有词条 | 
| 5 | Term getTerm() 返回此查询的词 | 
| 6 | int hashCode() 该对象返回哈希码值 | 
| 7 | String toString(String field) 打印这个查询的一个用户可读的版本 | 
继承的方法
这个类继承了以下类方法:
- 
org.apache.lucene.search.Query 
- 
java.lang.Object 

