Package org.apache.lucene.misc.search
Class HumanReadableQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.misc.search.HumanReadableQuery
-
public final class HumanReadableQuery extends Query
A simple query wrapper for debug purposes. Behaves like the given query, but when printing to a string, it will prepend the description parameter to the query output.
-
-
Constructor Summary
Constructors Constructor Description HumanReadableQuery(Query in, String description)Create a new HumanReadableQuery
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WeightcreateWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)booleanequals(Object other)StringgetDescription()QuerygetWrappedQuery()inthashCode()Queryrewrite(IndexSearcher indexSearcher)StringtoString(String field)voidvisit(QueryVisitor visitor)-
Methods inherited from class org.apache.lucene.search.Query
classHash, rewrite, sameClassAs, toString
-
-
-
-
Method Detail
-
getWrappedQuery
public Query getWrappedQuery()
- Returns:
- the wrapped Query
-
getDescription
public String getDescription()
- Returns:
- the query description
-
rewrite
public Query rewrite(IndexSearcher indexSearcher)
-
visit
public void visit(QueryVisitor visitor)
-
createWeight
public Weight createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
- Overrides:
createWeightin classQuery
-
-