|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.modeshape.jcr.query.lucene.LuceneQueryFactory
org.modeshape.jcr.query.lucene.basic.BasicLuceneQueryFactory
public class BasicLuceneQueryFactory
The LuceneQueryFactory
customization that produces Query
objects based upon the BasicLuceneSchema
.
Field Summary | |
---|---|
protected static int |
MAX_DEPTH
|
protected static int |
MAX_SNS_INDEX
|
protected static int |
MIN_DEPTH
|
protected static int |
MIN_SNS_INDEX
|
Fields inherited from class org.modeshape.jcr.query.lucene.LuceneQueryFactory |
---|
context, factories, nameFactory, pathFactory, searchFactory, stringFactory, version |
Constructor Summary | |
---|---|
BasicLuceneQueryFactory(QueryContext context,
org.hibernate.search.SearchFactory searchFactory,
org.apache.lucene.util.Version version)
|
Method Summary | |
---|---|
protected org.apache.lucene.search.Query |
createSnsIndexQuery(String likeExpression)
Utility method to generate a query against the SNS indexes. |
protected org.apache.lucene.search.Query |
findAllNodesAtOrBelow(Path ancestorPath)
Return a query that will find all documents representing nodes at or below the supplied path. |
protected org.apache.lucene.search.Query |
findAllNodesBelow(Path ancestorPath)
Return a query that will find all documents representing nodes below the supplied path. |
protected org.apache.lucene.search.Query |
findChildNodes(Path parentPath)
Return a query that can be used to find all of the documents that represent nodes that are children of the node at the supplied path. |
protected org.apache.lucene.search.Query |
findNodeAt(Path path)
Create a query that can be used to find the one document (or node) that exists at the exact path supplied. |
protected org.apache.lucene.search.Query |
findNodesLike(SelectorName selectorName,
String fieldName,
String likeExpression,
CaseOperations.CaseOperation caseOperation)
Construct a Query implementation that scores documents with a string field value that is LIKE the supplied
constraint value, where the LIKE expression contains the SQL wildcard characters '%' and '_' or the regular expression
wildcard characters '*' and '?'. |
protected org.apache.lucene.search.Query |
findNodesLike(String fieldName,
String likeExpression,
CaseOperations.CaseOperation caseOperation)
|
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
Length propertyLength,
Operator operator,
Object value)
Create a query that finds documents with fields whose lengths fit the supplied operator/value criteria. |
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
NodeDepth depthConstraint,
Operator operator,
Object value)
|
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
NodeLocalName nodeName,
Operator operator,
Object value,
CaseOperations.CaseOperation caseOperation)
|
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
NodeName nodeName,
Operator operator,
Object value,
CaseOperations.CaseOperation caseOperation)
|
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
NodePath nodePath,
Operator operator,
Object value,
CaseOperations.CaseOperation caseOperation)
|
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
PropertyValue propertyValue,
Operator operator,
Object value,
CaseOperations.CaseOperation caseOperation)
Create a query that finds documents with fields whose values fit the supplied operator/value criteria. |
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
PropertyValue propertyValue,
Operator operator,
Object value,
CaseOperations.CaseOperation caseOperation,
PropertyType valueType,
Schemata.Column metadata)
|
protected org.apache.lucene.search.Query |
findNodesWith(SelectorName selectorName,
ReferenceValue referenceValue,
Operator operator,
Object value)
Create a query that finds documents with fields that are references that fit the supplied operator/value criteria. |
protected org.apache.lucene.search.Query |
findNodesWithNumericRange(SelectorName selectorName,
NodeDepth depth,
Object lowerValue,
Object upperValue,
boolean includesLower,
boolean includesUpper)
Create a query that finds documents with fields with depths that are in the supplied range. |
protected org.apache.lucene.search.Query |
findNodesWithNumericRange(SelectorName selectorName,
PropertyValue propertyValue,
Object lowerValue,
Object upperValue,
boolean includesLower,
boolean includesUpper)
Create a query that finds documents with fields with values that are in the supplied range. |
protected org.apache.lucene.search.Query |
findNodesWithNumericRange(SelectorName selectorName,
String field,
Object lowerValue,
Object upperValue,
boolean includesLower,
boolean includesUpper)
|
protected String |
fullTextFieldName(String propertyName)
Create the field name that will be used to store the full-text searchable property values. |
protected org.apache.lucene.analysis.Analyzer |
getFullTextSearchAnalyzer()
|
protected String |
likeExpresionForWildcardPath(String path)
|
protected String |
pathAsString(Path path)
|
Methods inherited from class org.modeshape.jcr.query.lucene.LuceneQueryFactory |
---|
createOperand, createQuery, createQuery, createQuery, createQuery, createQuery, createQuery, fieldNameFor, getMetadataFor, not, schemata, stringValueFrom |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int MIN_DEPTH
protected static final int MAX_DEPTH
protected static final int MIN_SNS_INDEX
protected static final int MAX_SNS_INDEX
Constructor Detail |
---|
public BasicLuceneQueryFactory(QueryContext context, org.hibernate.search.SearchFactory searchFactory, org.apache.lucene.util.Version version)
context
- searchFactory
- version
- the Lucene versionMethod Detail |
---|
protected final String pathAsString(Path path)
protected org.apache.lucene.analysis.Analyzer getFullTextSearchAnalyzer()
getFullTextSearchAnalyzer
in class LuceneQueryFactory
protected String fullTextFieldName(String propertyName)
If a property name is provided, then the resulting field name is generated from the
full-text prefix
and the property name. Otherwise, the result is the field
name where the full-text terms for the entire node are indexed.
fullTextFieldName
in class LuceneQueryFactory
propertyName
- the name of the property; may not null
protected org.apache.lucene.search.Query findAllNodesBelow(Path ancestorPath)
LuceneQueryFactory
findAllNodesBelow
in class LuceneQueryFactory
ancestorPath
- the path of the ancestor node; never null
protected org.apache.lucene.search.Query findAllNodesAtOrBelow(Path ancestorPath)
LuceneQueryFactory
findAllNodesAtOrBelow
in class LuceneQueryFactory
ancestorPath
- the path of the ancestor node; never null
protected org.apache.lucene.search.Query findChildNodes(Path parentPath)
LuceneQueryFactory
findChildNodes
in class LuceneQueryFactory
parentPath
- the path of the parent node.
protected org.apache.lucene.search.Query findNodeAt(Path path)
LuceneQueryFactory
findNodeAt
in class LuceneQueryFactory
path
- the path of the node
protected org.apache.lucene.search.Query findNodesLike(SelectorName selectorName, String fieldName, String likeExpression, CaseOperations.CaseOperation caseOperation)
LuceneQueryFactory
Query
implementation that scores documents with a string field value that is LIKE the supplied
constraint value, where the LIKE expression contains the SQL wildcard characters '%' and '_' or the regular expression
wildcard characters '*' and '?'.
findNodesLike
in class LuceneQueryFactory
selectorName
- the name of the selector (or node type) being queried; may not be nullfieldName
- the name of the document field to searchlikeExpression
- the JCR like expressioncaseOperation
- the operation that should be performed on the indexed string before being used; may not be null
protected org.apache.lucene.search.Query findNodesLike(String fieldName, String likeExpression, CaseOperations.CaseOperation caseOperation)
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, Length propertyLength, Operator operator, Object value)
LuceneQueryFactory
findNodesWith
in class LuceneQueryFactory
selectorName
- the name of the selector (or node type) being queried; may not be nullpropertyLength
- the property specificationoperator
- the comparison operatorvalue
- the length value
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, PropertyValue propertyValue, Operator operator, Object value, CaseOperations.CaseOperation caseOperation)
LuceneQueryFactory
findNodesWith
in class LuceneQueryFactory
selectorName
- the name of the selector (or node type) being queried; may not be nullpropertyValue
- the property specificationoperator
- the comparison operatorvalue
- the valuecaseOperation
- the operation that should be used against the string values in the indexes before applying the
criteria, or null if the operation is not known
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, PropertyValue propertyValue, Operator operator, Object value, CaseOperations.CaseOperation caseOperation, PropertyType valueType, Schemata.Column metadata)
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, ReferenceValue referenceValue, Operator operator, Object value)
LuceneQueryFactory
findNodesWith
in class LuceneQueryFactory
selectorName
- the name of the selector (or node type) being queried; may not be nullreferenceValue
- the property specificationoperator
- the comparison operatorvalue
- the reference value
protected org.apache.lucene.search.Query findNodesWithNumericRange(SelectorName selectorName, PropertyValue propertyValue, Object lowerValue, Object upperValue, boolean includesLower, boolean includesUpper)
LuceneQueryFactory
findNodesWithNumericRange
in class LuceneQueryFactory
selectorName
- the name of the selector (or node type) being queried; may not be nullpropertyValue
- the property specificationlowerValue
- the lower valueupperValue
- the upper valueincludesLower
- true if the range should include the lower value, or false if the lower value should be excludedincludesUpper
- true if the range should include the upper value, or false if the upper value should be excluded
protected org.apache.lucene.search.Query findNodesWithNumericRange(SelectorName selectorName, NodeDepth depth, Object lowerValue, Object upperValue, boolean includesLower, boolean includesUpper)
LuceneQueryFactory
findNodesWithNumericRange
in class LuceneQueryFactory
selectorName
- the name of the selector (or node type) being queried; may not be nulldepth
- the property specificationlowerValue
- the lower valueupperValue
- the upper valueincludesLower
- true if the range should include the lower value, or false if the lower value should be excludedincludesUpper
- true if the range should include the upper value, or false if the upper value should be excluded
protected org.apache.lucene.search.Query findNodesWithNumericRange(SelectorName selectorName, String field, Object lowerValue, Object upperValue, boolean includesLower, boolean includesUpper)
protected String likeExpresionForWildcardPath(String path)
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, NodePath nodePath, Operator operator, Object value, CaseOperations.CaseOperation caseOperation)
findNodesWith
in class LuceneQueryFactory
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, NodeName nodeName, Operator operator, Object value, CaseOperations.CaseOperation caseOperation)
findNodesWith
in class LuceneQueryFactory
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, NodeLocalName nodeName, Operator operator, Object value, CaseOperations.CaseOperation caseOperation)
findNodesWith
in class LuceneQueryFactory
protected org.apache.lucene.search.Query findNodesWith(SelectorName selectorName, NodeDepth depthConstraint, Operator operator, Object value)
findNodesWith
in class LuceneQueryFactory
protected org.apache.lucene.search.Query createSnsIndexQuery(String likeExpression)
likeExpression
- the expression that uses the JCR 2.0 LIKE representation, and which includes the leading '[' and
trailing ']' characters
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |