Package com.google.gerrit.index.query
Class IndexPredicate<I>
java.lang.Object
com.google.gerrit.index.query.Predicate<I>
com.google.gerrit.index.query.OperatorPredicate<I>
com.google.gerrit.index.query.IndexPredicate<I>
- All Implemented Interfaces:
- Matchable<I>
- Direct Known Subclasses:
- ChangeIndexPredicate,- IntegerRangePredicate,- RegexPredicate,- TimestampRangePredicate
Predicate that is mapped to a field in the index.
- 
Nested Class SummaryNested classes/interfaces inherited from class com.google.gerrit.index.query.PredicatePredicate.Any<T>
- 
Field SummaryFields inherited from class com.google.gerrit.index.query.OperatorPredicatename, value
- 
Constructor SummaryConstructorsModifierConstructorDescriptionprotectedIndexPredicate(SchemaFieldDefs.SchemaField<I, ?> def, String value) protectedIndexPredicate(SchemaFieldDefs.SchemaField<I, ?> def, String name, String value) 
- 
Method SummaryMethods inherited from class com.google.gerrit.index.query.OperatorPredicatecopy, equals, getOperator, getValue, hashCode, toStringMethods inherited from class com.google.gerrit.index.query.Predicateand, and, any, asMatchable, estimateCost, getChild, getChildCount, getChildren, getFlattenedPredicateList, getLeafCount, getPredicateString, isLeaf, isMatchable, not, or, or, supportedForQueries
- 
Constructor Details- 
IndexPredicate
- 
IndexPredicate
 
- 
- 
Method Details- 
getField
- 
getType
- 
matchThis method matches documents without calling an index subsystem. For primitive fields (e.g. integer, long) , the matching logic is consistent across this method and all known index implementations. For text fields (i.e. prefix and full-text) the semantics vary between this implementation and known index implementations:
- Prefix: Lucene as well as
match(Object)matches terms as true prefixes (prefix:foo -> `foo bar` matches, but `baz foo bar` does not match). The index implementation at Google tokenizes both the query and the indexed text and matches tokens individually (prefix:fo ba -> `baz foo bar` matches).
- Full text: Lucene uses a
PhraseQueryto search for terms in full text fields in-order. The index implementation at Google as well asmatch(Object)tokenizes both the query and the indexed text and matches tokens individually.
- Prefix: Lucene as well as
- 
getCostpublic int getCost()Description copied from interface:MatchableReturns a cost estimate to run this predicate, higher figures cost more.
 
-