Class ChangeIndexRewriter
java.lang.Object
com.google.gerrit.server.index.change.ChangeIndexRewriter
- All Implemented Interfaces:
IndexRewriter<ChangeData>
Rewriter that pushes boolean logic into the secondary index.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.google.common.collect.ImmutableSet
<Change.Status> Set of all closed change statuses.static final com.google.common.collect.ImmutableSet
<Change.Status> Set of all open change statuses. -
Method Summary
Modifier and TypeMethodDescriptionstatic Set
<Change.Status> Get the set of statuses that changes matching the given predicate may have.rewrite
(Predicate<ChangeData> in, QueryOptions opts) Returns a sanitized version of the provided predicate.
-
Field Details
-
OPEN_STATUSES
Set of all open change statuses. -
CLOSED_STATUSES
Set of all closed change statuses.
-
-
Method Details
-
getPossibleStatus
Get the set of statuses that changes matching the given predicate may have.- Parameters:
in
- predicate- Returns:
- the maximal set of statuses that any changes matching the input predicates may have,
based on examining boolean and
ChangeStatusPredicate
s.
-
rewrite
public Predicate<ChangeData> rewrite(Predicate<ChangeData> in, QueryOptions opts) throws QueryParseException Description copied from interface:IndexRewriter
Returns a sanitized version of the provided predicate. UsesQueryOptions
to enforce index-specific limits such asmaxTerms
.- Specified by:
rewrite
in interfaceIndexRewriter<ChangeData>
- Throws:
QueryParseException
-