Package com.google.gerrit.index.query
Class IntegerRangePredicate<T>
java.lang.Object
com.google.gerrit.index.query.Predicate<T>
com.google.gerrit.index.query.OperatorPredicate<I>
com.google.gerrit.index.query.IndexPredicate<T>
com.google.gerrit.index.query.IntegerRangePredicate<T>
- All Implemented Interfaces:
Matchable<T>
- Direct Known Subclasses:
IntegerRangeChangePredicate
-
Nested Class Summary
Nested classes/interfaces inherited from class com.google.gerrit.index.query.Predicate
Predicate.Any<T> -
Field Summary
Fields inherited from class com.google.gerrit.index.query.OperatorPredicate
name, value -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIntegerRangePredicate(SchemaFieldDefs.SchemaField<T, Integer> type, String value) -
Method Summary
Modifier and TypeMethodDescriptionintReturn the maximum value of this predicate's range, inclusive.intReturn the minimum value of this predicate's range, inclusive.protected abstract IntegergetValueInt(T object) booleanThis method matches documents without calling an index subsystem.Methods inherited from class com.google.gerrit.index.query.IndexPredicate
getCost, getField, getTypeMethods inherited from class com.google.gerrit.index.query.OperatorPredicate
copy, equals, getOperator, getValue, hashCode, toStringMethods inherited from class com.google.gerrit.index.query.Predicate
and, and, any, asMatchable, estimateCost, getChild, getChildCount, getChildren, getFlattenedPredicateList, getLeafCount, getPredicateString, isLeaf, isMatchable, not, or, or, supportedForQueries
-
Constructor Details
-
IntegerRangePredicate
protected IntegerRangePredicate(SchemaFieldDefs.SchemaField<T, Integer> type, String value) throws QueryParseException- Throws:
QueryParseException
-
-
Method Details
-
getValueInt
-
match
Description copied from class:IndexPredicateThis 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
IndexPredicate.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 asIndexPredicate.match(Object)tokenizes both the query and the indexed text and matches tokens individually. - Prefix: Lucene as well as
-
getMinimumValue
public int getMinimumValue()Return the minimum value of this predicate's range, inclusive. -
getMaximumValue
public int getMaximumValue()Return the maximum value of this predicate's range, inclusive.
-