Class ChangeIndexRewriter
- java.lang.Object
-
- com.google.gerrit.server.index.change.ChangeIndexRewriter
-
- All Implemented Interfaces:
IndexRewriter<ChangeData>
public class ChangeIndexRewriter extends Object implements IndexRewriter<ChangeData>
Rewriter that pushes boolean logic into the secondary index.
-
-
Field Summary
Fields Modifier and Type Field Description static Set<Change.Status>
CLOSED_STATUSES
Set of all closed change statuses.static Set<Change.Status>
OPEN_STATUSES
Set of all open change statuses.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Set<Change.Status>
getPossibleStatus(Predicate<ChangeData> in)
Get the set of statuses that changes matching the given predicate may have.Predicate<ChangeData>
rewrite(Predicate<ChangeData> in, QueryOptions opts)
Returns a sanitized version of the provided predicate.
-
-
-
Field Detail
-
OPEN_STATUSES
public static final Set<Change.Status> OPEN_STATUSES
Set of all open change statuses.
-
CLOSED_STATUSES
public static final Set<Change.Status> CLOSED_STATUSES
Set of all closed change statuses.
-
-
Method Detail
-
getPossibleStatus
public static Set<Change.Status> getPossibleStatus(Predicate<ChangeData> in)
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
-
-