|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.query.lucene.LuceneQueryFactory
public class LuceneQueryFactory
Factory that creates Lucene queries from QOM elements.
Nested Class Summary | |
---|---|
protected class |
LuceneQueryFactory.QueryPair
|
protected static class |
LuceneQueryFactory.Transform
|
Constructor Summary | |
---|---|
LuceneQueryFactory(SessionImpl session,
SearchIndex index,
Map<String,Value> bindVariables)
Creates a new lucene query factory. |
Method Summary | |
---|---|
protected void |
addBooleanConstraint(org.apache.lucene.search.BooleanQuery query,
Constraint constraint,
org.apache.lucene.search.BooleanClause.Occur occur,
Map<String,NodeType> selectorMap,
JackrabbitIndexSearcher searcher)
|
protected org.apache.lucene.search.Query |
create(Constraint constraint,
Map<String,NodeType> selectorMap,
JackrabbitIndexSearcher searcher)
|
org.apache.lucene.search.Query |
create(FullTextSearchImpl fts)
Creates a lucene query for the given QOM full text search. |
org.apache.lucene.search.Query |
create(PropertyExistenceImpl prop)
Creates a lucene query for the given QOM property existence constraint. |
org.apache.lucene.search.Query |
create(Selector selector)
Creates a lucene query for the given QOM selector. |
protected org.apache.lucene.index.Term |
createNodeTypeTerm(NodeType type)
|
List<Row> |
execute(Map<String,PropertyValue> columns,
Selector selector,
Constraint constraint)
|
protected org.apache.lucene.search.BooleanQuery |
getAndQuery(And and,
Map<String,NodeType> selectorMap,
JackrabbitIndexSearcher searcher)
|
protected org.apache.lucene.search.Query |
getComparisonQuery(DynamicOperand left,
int transform,
String operator,
StaticOperand rigth,
Map<String,NodeType> selectorMap)
|
protected org.apache.lucene.search.Query |
getDescendantNodeQuery(DescendantNode dn,
JackrabbitIndexSearcher searcher)
|
protected org.apache.lucene.search.Query |
getFullTextSearchQuery(FullTextSearch fts)
|
protected org.apache.lucene.search.Query |
getNodeIdQuery(String field,
String path)
|
protected org.apache.lucene.search.Query |
getNodeLocalNameQuery(int transform,
String operator,
StaticOperand right)
|
protected org.apache.lucene.search.Query |
getNodeNameQuery(int transform,
String operator,
StaticOperand right)
|
protected org.apache.jackrabbit.core.query.lucene.NotQuery |
getNotQuery(Not not,
Map<String,NodeType> selectorMap,
JackrabbitIndexSearcher searcher)
|
protected org.apache.lucene.search.BooleanQuery |
getOrQuery(Or or,
Map<String,NodeType> selectorMap,
JackrabbitIndexSearcher searcher)
|
protected org.apache.lucene.search.Query |
getPropertyExistenceQuery(PropertyExistence property)
|
protected org.apache.lucene.search.Query |
getPropertyValueQuery(String field,
String operator,
Value value,
int type,
int transform)
|
protected org.apache.lucene.index.Term |
getTerm(String field,
String value)
|
protected String |
getValueString(Value value,
int type)
|
protected Predicate |
mapConstraintToQueryAndFilter(LuceneQueryFactory.QueryPair query,
Constraint constraint,
Map<String,NodeType> selectorMap,
JackrabbitIndexSearcher searcher,
org.apache.lucene.index.IndexReader reader)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LuceneQueryFactory(SessionImpl session, SearchIndex index, Map<String,Value> bindVariables) throws RepositoryException
session
- the session that executes the query.index
- the search indexbindVariables
- the bind variable values of the query
RepositoryException
Method Detail |
---|
public List<Row> execute(Map<String,PropertyValue> columns, Selector selector, Constraint constraint) throws RepositoryException, IOException
RepositoryException
IOException
public org.apache.lucene.search.Query create(Selector selector) throws RepositoryException
selector
- the selector.
RepositoryException
- if an error occurs while creating the query.protected org.apache.lucene.index.Term createNodeTypeTerm(NodeType type) throws RepositoryException
RepositoryException
public org.apache.lucene.search.Query create(FullTextSearchImpl fts) throws RepositoryException
constraint
- the full text search constraint.
RepositoryException
- if an error occurs while creating the query.public org.apache.lucene.search.Query create(PropertyExistenceImpl prop) throws RepositoryException
constraint
- the QOM constraint.
RepositoryException
- if an error occurs while creating the query.protected Predicate mapConstraintToQueryAndFilter(LuceneQueryFactory.QueryPair query, Constraint constraint, Map<String,NodeType> selectorMap, JackrabbitIndexSearcher searcher, org.apache.lucene.index.IndexReader reader) throws RepositoryException, IOException
RepositoryException
IOException
protected org.apache.lucene.search.Query create(Constraint constraint, Map<String,NodeType> selectorMap, JackrabbitIndexSearcher searcher) throws RepositoryException, IOException
RepositoryException
IOException
protected org.apache.lucene.search.Query getDescendantNodeQuery(DescendantNode dn, JackrabbitIndexSearcher searcher) throws RepositoryException, IOException
RepositoryException
IOException
protected org.apache.lucene.search.Query getFullTextSearchQuery(FullTextSearch fts) throws RepositoryException
RepositoryException
protected org.apache.lucene.search.BooleanQuery getAndQuery(And and, Map<String,NodeType> selectorMap, JackrabbitIndexSearcher searcher) throws RepositoryException, IOException
RepositoryException
IOException
protected org.apache.lucene.search.BooleanQuery getOrQuery(Or or, Map<String,NodeType> selectorMap, JackrabbitIndexSearcher searcher) throws RepositoryException, IOException
RepositoryException
IOException
protected void addBooleanConstraint(org.apache.lucene.search.BooleanQuery query, Constraint constraint, org.apache.lucene.search.BooleanClause.Occur occur, Map<String,NodeType> selectorMap, JackrabbitIndexSearcher searcher) throws RepositoryException, IOException
RepositoryException
IOException
protected org.apache.jackrabbit.core.query.lucene.NotQuery getNotQuery(Not not, Map<String,NodeType> selectorMap, JackrabbitIndexSearcher searcher) throws RepositoryException, IOException
RepositoryException
IOException
protected org.apache.lucene.search.Query getPropertyExistenceQuery(PropertyExistence property) throws RepositoryException
RepositoryException
protected org.apache.lucene.search.Query getComparisonQuery(DynamicOperand left, int transform, String operator, StaticOperand rigth, Map<String,NodeType> selectorMap) throws RepositoryException
RepositoryException
protected org.apache.lucene.search.Query getNodeNameQuery(int transform, String operator, StaticOperand right) throws RepositoryException
RepositoryException
protected org.apache.lucene.search.Query getNodeLocalNameQuery(int transform, String operator, StaticOperand right) throws RepositoryException
RepositoryException
protected org.apache.lucene.search.Query getNodeIdQuery(String field, String path) throws RepositoryException
RepositoryException
protected org.apache.lucene.search.Query getPropertyValueQuery(String field, String operator, Value value, int type, int transform) throws RepositoryException
RepositoryException
protected org.apache.lucene.index.Term getTerm(String field, String value)
protected String getValueString(Value value, int type) throws RepositoryException
RepositoryException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |