@PublicApi @FunctionalInterface public interface QueryReducer<T>
QueryTraversal
to reduce the fields of a Document (or part of it) to a single value.
How this happens in detail (pre vs post-order for example) is defined by QueryTraversal
.
See QueryTraversal.reducePostOrder(QueryReducer, Object)
and QueryTraversal.reducePreOrder(QueryReducer, Object)
Modifier and Type | Method and Description |
---|---|
T |
reduceField(QueryVisitorFieldEnvironment fieldEnvironment,
T acc)
Called each time a field is visited.
|
T reduceField(QueryVisitorFieldEnvironment fieldEnvironment, T acc)
fieldEnvironment
- the environment to this callacc
- the previous result