Package com.atlassian.jira.jql.query
Class QueryVisitor
java.lang.Object
com.atlassian.jira.jql.query.QueryVisitor
@Deprecated(since="10.7",
forRemoval=true)
@InjectableComponent
public class QueryVisitor
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Used to generate the Lucene query from a
Query
. This visits the nodes of the tree
and creates a lucene query based on its structure. Users of this class should only call createQuery(com.atlassian.query.clause.Clause, com.atlassian.jira.jql.query.QueryCreationContext)
and not
use the visitor directly as the query in a QueryFactoryResult
may not be valid.- Since:
- v4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Deprecated, for removal: This API element is subject to removal in a future version. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory
Deprecated, for removal: This API element is subject to removal in a future version. -
Constructor Summary
ConstructorsConstructorDescriptionQueryVisitor
(ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory contextAwareQueryVisitorFactory, WorklogClausesTransformerVisitor.Factory worklogsVisitorFactory, DeMorgansVisitor.DeMorgansVisitorFactory deMorgansVisitorFactory) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionprotected ContextAwareQueryVisitor
createContextAwareQueryVisitor
(QueryCreationContext queryCreationContext, Clause clause) Deprecated, for removal: This API element is subject to removal in a future version.org.apache.lucene.search.Query
createQuery
(Clause clause, QueryCreationContext queryCreationContext) Deprecated, for removal: This API element is subject to removal in a future version.Create a lucene query for the passed clause.
-
Field Details
-
contextAwareQueryVisitorFactory
protected final ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory contextAwareQueryVisitorFactoryDeprecated, for removal: This API element is subject to removal in a future version.
-
-
Constructor Details
-
QueryVisitor
public QueryVisitor(ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory contextAwareQueryVisitorFactory, WorklogClausesTransformerVisitor.Factory worklogsVisitorFactory, DeMorgansVisitor.DeMorgansVisitorFactory deMorgansVisitorFactory) Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
createQuery
public org.apache.lucene.search.Query createQuery(Clause clause, QueryCreationContext queryCreationContext) Deprecated, for removal: This API element is subject to removal in a future version.Create a lucene query for the passed clause.NOTE: The query generated by this method will probably not run in Lucene even though it is correct. Lucene has some quirks when dealing with negative queries. Lucene will not search for negative queries, it will only filter the results from a positive query (e.g. +project:monkey -status:blocker will work while -status:blocker will not).
NOTE: This visitor will push all instances of the
NotClause
out of the tree by using theDeMorgansVisitor
so that the terminal clauses will handle all the negation logic and the visitor does not need to deal with NOT's.- Parameters:
clause
- the clause to process.- Returns:
- the generated lucene query.
-
createContextAwareQueryVisitor
protected ContextAwareQueryVisitor createContextAwareQueryVisitor(QueryCreationContext queryCreationContext, Clause clause) Deprecated, for removal: This API element is subject to removal in a future version.
-
QueryVisitor
instead.