public class LuceneQueryBuilder extends Object implements QueryNodeVisitor
Query
tree that can be executed
on an index.
todo introduce a node type hierarchy for efficient translation of NodeTypeQueryNodeModifier and Type | Method and Description |
---|---|
org.apache.lucene.search.Query |
createPredicateDeref(org.apache.lucene.search.Query subQuery,
DerefQueryNode node,
Object data) |
static org.apache.lucene.search.Query |
createQuery(QueryRootNode root,
SessionImpl session,
ItemStateManager sharedItemMgr,
NamespaceMappings nsMappings,
org.apache.lucene.analysis.Analyzer analyzer,
PropertyTypeRegistry propReg,
SynonymProvider synonymProvider,
IndexFormatVersion indexFormatVersion,
org.apache.jackrabbit.core.query.lucene.PerQueryCache cache)
Creates a lucene
Query tree from an
abstract query tree. |
Object |
visit(AndQueryNode node,
Object data) |
Object |
visit(DerefQueryNode node,
Object data) |
Object |
visit(ExactQueryNode node,
Object data) |
Object |
visit(LocationStepQueryNode node,
Object data) |
Object |
visit(NodeTypeQueryNode node,
Object data) |
Object |
visit(NotQueryNode node,
Object data) |
Object |
visit(OrderQueryNode node,
Object data) |
Object |
visit(OrQueryNode node,
Object data) |
Object |
visit(PathQueryNode node,
Object data) |
Object |
visit(PropertyFunctionQueryNode node,
Object data) |
Object |
visit(QueryRootNode node,
Object data) |
Object |
visit(RelationQueryNode node,
Object data) |
Object |
visit(TextsearchQueryNode node,
Object data) |
public static org.apache.lucene.search.Query createQuery(QueryRootNode root, SessionImpl session, ItemStateManager sharedItemMgr, NamespaceMappings nsMappings, org.apache.lucene.analysis.Analyzer analyzer, PropertyTypeRegistry propReg, SynonymProvider synonymProvider, IndexFormatVersion indexFormatVersion, org.apache.jackrabbit.core.query.lucene.PerQueryCache cache) throws RepositoryException
Query
tree from an
abstract query tree.root
- the root node of the abstract query tree.session
- of the user executing the query.sharedItemMgr
- the shared item state manager of the workspace.nsMappings
- namespace resolver for internal prefixes.analyzer
- for parsing the query statement of the contains
function.propReg
- the property type registry to lookup type
information.synonymProvider
- the synonym provider or null
if node
is configured.indexFormatVersion
- the index format version to be usedRepositoryException
- if an error occurs during the translation.public Object visit(QueryRootNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public Object visit(OrQueryNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public Object visit(AndQueryNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public Object visit(NotQueryNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public Object visit(ExactQueryNode node, Object data)
visit
in interface QueryNodeVisitor
public Object visit(NodeTypeQueryNode node, Object data)
visit
in interface QueryNodeVisitor
public Object visit(TextsearchQueryNode node, Object data)
visit
in interface QueryNodeVisitor
public Object visit(PathQueryNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public Object visit(LocationStepQueryNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public Object visit(DerefQueryNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public Object visit(RelationQueryNode node, Object data) throws RepositoryException
visit
in interface QueryNodeVisitor
RepositoryException
public org.apache.lucene.search.Query createPredicateDeref(org.apache.lucene.search.Query subQuery, DerefQueryNode node, Object data) throws RepositoryException
RepositoryException
public Object visit(OrderQueryNode node, Object data)
visit
in interface QueryNodeVisitor
public Object visit(PropertyFunctionQueryNode node, Object data)
visit
in interface QueryNodeVisitor
Copyright © 2004–2024 The Apache Software Foundation. All rights reserved.