Lucene - 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.
Following is the declaration for org.apache.lucene.search.Query class:
public abstract class Query extends Object implements Serializable, Cloneable
|S.N.||Constructor & Description|
|S.N.||Method & Description|
Returns a clone of this query.
Query combine(Query queries)
Expert: called when re-writing queries under MultiSearcher.
Weight createWeight(Searcher searcher)
Expert: Constructs an appropriate Weight implementation for this query.
boolean equals(Object obj)
void extractTerms(Set<Term> terms)
Expert: adds all terms occurring in this query to the terms set.
Gets the boost for this clause.
Similarity getSimilarity(Searcher searcher)
Deprecated. Instead of using "runtime" subclassing/delegation, subclass the Weight instead.
static Query mergeBooleanQueries(BooleanQuery... queries)
Expert: merges the clauses of a set of BooleanQuery's into a single BooleanQuery.
Query rewrite(IndexReader reader)
Expert: called to re-write queries into primitive queries.
void setBoost(float b)
Sets the boost for this query clause to b.
Prints a query to a string.
abstract String toString(String field)
Prints a query to a string, with field assumed to be the default field and omitted.
Weight weight(Searcher searcher)
Deprecated. never ever use this method in Weight implementations. Subclasses of Query should use createWeight(org.apache.lucene.search.Searcher), instead.
This class inherits methods from the following classes: