|
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.apache.lucene.search.Query
org.modeshape.jcr.query.lucene.CompareQuery<ValueType>
ValueType
- public abstract class CompareQuery<ValueType>
A Lucene Query
implementation that is used to apply a Comparison
constraint against the Path of nodes. This
query implementation works by using the weight and scorer
of the wrapped
query to score (and return) only those documents that correspond to nodes with Paths that satisfy the constraint.
Nested Class Summary | |
---|---|
protected class |
CompareQuery.CompareScorer
A scorer for the Path query. |
protected class |
CompareQuery.CompareWeight
Calculates query weights and builds query scores for our NOT queries. |
protected static interface |
CompareQuery.Evaluator<ValueType>
|
Field Summary | |
---|---|
protected ValueType |
constraintValue
|
protected CompareQuery.Evaluator<ValueType> |
evaluator
|
protected String |
fieldName
The operand that is being negated by this query. |
protected org.apache.lucene.document.FieldSelector |
fieldSelector
|
protected ValueFactory<String> |
stringFactory
|
protected ValueFactory<ValueType> |
valueTypeFactory
|
Constructor Summary | |
---|---|
protected |
CompareQuery(String fieldName,
ValueType constraintValue,
ValueFactory<ValueType> valueTypeFactory,
ValueFactory<String> stringFactory,
CompareQuery.Evaluator<ValueType> evaluator)
Construct a Query implementation that scores nodes according to the supplied comparator. |
protected |
CompareQuery(String fieldName,
ValueType constraintValue,
ValueFactory<ValueType> valueTypeFactory,
ValueFactory<String> stringFactory,
CompareQuery.Evaluator<ValueType> evaluator,
org.apache.lucene.document.FieldSelector fieldSelector)
Construct a Query implementation that scores nodes according to the supplied comparator. |
Method Summary | |
---|---|
org.apache.lucene.search.Weight |
createWeight(org.apache.lucene.search.Searcher searcher)
|
protected ValueType |
readFromDocument(org.apache.lucene.index.IndexReader reader,
int docId)
|
String |
toString(String field)
|
Methods inherited from class org.apache.lucene.search.Query |
---|
clone, combine, equals, extractTerms, getBoost, getSimilarity, hashCode, mergeBooleanQueries, rewrite, setBoost, toString, weight |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final String fieldName
protected final org.apache.lucene.document.FieldSelector fieldSelector
protected final ValueType constraintValue
protected final CompareQuery.Evaluator<ValueType> evaluator
protected final ValueFactory<ValueType> valueTypeFactory
protected final ValueFactory<String> stringFactory
Constructor Detail |
---|
protected CompareQuery(String fieldName, ValueType constraintValue, ValueFactory<ValueType> valueTypeFactory, ValueFactory<String> stringFactory, CompareQuery.Evaluator<ValueType> evaluator)
Query
implementation that scores nodes according to the supplied comparator.
fieldName
- the name of the document field containing the value; may not be nullconstraintValue
- the constraint value; may not be nullvalueTypeFactory
- the value factory that can be used during the scoring; may not be nullstringFactory
- the string factory that can be used during the scoring; may not be nullevaluator
- the CompareQuery.Evaluator
implementation that returns whether the node value satisfies the constraint; may not
be nullprotected CompareQuery(String fieldName, ValueType constraintValue, ValueFactory<ValueType> valueTypeFactory, ValueFactory<String> stringFactory, CompareQuery.Evaluator<ValueType> evaluator, org.apache.lucene.document.FieldSelector fieldSelector)
Query
implementation that scores nodes according to the supplied comparator.
fieldName
- the name of the document field containing the value; may not be nullconstraintValue
- the constraint value; may not be nullvalueTypeFactory
- the value factory that can be used during the scoring; may not be null unless
readFromDocument(IndexReader, int)
is overloaded to not use itstringFactory
- the string factory that can be used during the scoring; may not be nullevaluator
- the CompareQuery.Evaluator
implementation that returns whether the node value satisfies the constraint; may not
be nullfieldSelector
- the field selector that should load the fields needed to recover the value; may be null if the field
selector should be generated automaticallyMethod Detail |
---|
protected ValueType readFromDocument(org.apache.lucene.index.IndexReader reader, int docId) throws IOException
IOException
public org.apache.lucene.search.Weight createWeight(org.apache.lucene.search.Searcher searcher)
createWeight
in class org.apache.lucene.search.Query
Query.createWeight(org.apache.lucene.search.Searcher)
public String toString(String field)
toString
in class org.apache.lucene.search.Query
Query.toString(java.lang.String)
|
ModeShape Distribution 3.0.0.Beta4 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |