@PublicApi @FunctionalInterface public interface QueryReducer<T>
QueryTraverser
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 QueryTraverser
.
See QueryTraverser.reducePostOrder(QueryReducer, Object)
and QueryTraverser.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