Class SimpleTermRewriteQuery
java.lang.Object
org.apache.lucene.search.Query
org.apache.lucene.queryparser.surround.query.RewriteQuery<SimpleTerm>
org.apache.lucene.queryparser.surround.query.SimpleTermRewriteQuery
-
Field Summary
Fields inherited from class org.apache.lucene.queryparser.surround.query.RewriteQuery
fieldName, qf, srndQuery
-
Constructor Summary
ConstructorsConstructorDescriptionSimpleTermRewriteQuery
(SimpleTerm srndQuery, String fieldName, BasicQueryFactory qf) -
Method Summary
Modifier and TypeMethodDescriptionrewrite
(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 Details
-
SimpleTermRewriteQuery
SimpleTermRewriteQuery(SimpleTerm srndQuery, String fieldName, BasicQueryFactory qf)
-
-
Method Details
-
rewrite
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<SimpleTerm>
- Throws:
IOException
- See Also:
-
visit
Description copied from class:Query
Recurse through the query tree, visiting any child queries.
-