Class DistanceRewriteQuery
- java.lang.Object
-
- org.apache.lucene.search.Query
-
- org.apache.lucene.queryparser.surround.query.RewriteQuery<DistanceQuery>
-
- org.apache.lucene.queryparser.surround.query.DistanceRewriteQuery
-
class DistanceRewriteQuery extends RewriteQuery<DistanceQuery>
-
-
Field Summary
-
Fields inherited from class org.apache.lucene.queryparser.surround.query.RewriteQuery
fieldName, qf, srndQuery
-
-
Constructor Summary
Constructors Constructor Description DistanceRewriteQuery(DistanceQuery srndQuery, java.lang.String fieldName, BasicQueryFactory qf)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Query
rewrite(IndexSearcher indexSearcher)
Expert: called to re-write queries into primitive queries.void
visit(QueryVisitor visitor)
Recurse through the query tree, visiting any child queries.-
Methods inherited from class org.apache.lucene.queryparser.surround.query.RewriteQuery
equals, hashCode, toString
-
Methods inherited from class org.apache.lucene.search.Query
classHash, createWeight, rewrite, sameClassAs, toString
-
-
-
-
Constructor Detail
-
DistanceRewriteQuery
DistanceRewriteQuery(DistanceQuery srndQuery, java.lang.String fieldName, BasicQueryFactory qf)
-
-
Method Detail
-
rewrite
public Query rewrite(IndexSearcher indexSearcher) throws java.io.IOException
Description copied from class:Query
Expert: called to re-write queries into primitive queries. For example, a PrefixQuery will be rewritten into a BooleanQuery that consists of TermQuerys.Callers are expected to call
rewrite
multiple times if necessary, until the rewritten query is the same as the original query.The rewrite process may be able to make use of IndexSearcher's executor and be executed in parallel if the executor is provided.
However, if any of the intermediary queries do not satisfy the new API, parallel rewrite is not possible for any subsequent sub-queries. To take advantage of this API, the entire query tree must override this method.
- Specified by:
rewrite
in classRewriteQuery<DistanceQuery>
- Throws:
java.io.IOException
- See Also:
IndexSearcher.rewrite(Query)
-
visit
public void visit(QueryVisitor visitor)
Description copied from class:Query
Recurse through the query tree, visiting any child queries.
-
-