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 Weight
createWeight(IndexSearcher searcher, ScoreMode scoreMode, float boost)
boolean
equals(Object other)
String
getDescription()
Query
getWrappedQuery()
int
hashCode()
Query
rewrite(IndexSearcher indexSearcher)
String
toString(String field)
void
visit(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:
createWeight
in classQuery
-
-