Class DefaultDocumentStore.DefaultSearch.DefaultGroupSearch
java.lang.Object
io.fluxzero.sdk.persisting.search.DefaultDocumentStore.DefaultSearch.DefaultGroupSearch
- All Implemented Interfaces:
GroupSearch
- Enclosing class:
DefaultDocumentStore.DefaultSearch
protected class DefaultDocumentStore.DefaultSearch.DefaultGroupSearch
extends Object
implements GroupSearch
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionPerforms aggregation over the given fields for each group.aggregateAsync(String... fields) Asynchronously performs aggregation over the given fields for each group.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GroupSearch
count, countAsync
-
Constructor Details
-
DefaultGroupSearch
protected DefaultGroupSearch()
-
-
Method Details
-
aggregate
Description copied from interface:GroupSearchPerforms aggregation over the given fields for each group.Each
Grouprepresents a unique combination of field values for the group-by fields. The returned map provides aggregate statistics (such as count, min, max, average, etc.) for each of the specified fields within each group.- Specified by:
aggregatein interfaceGroupSearch- Parameters:
fields- The fields to aggregate within each group.- Returns:
- A map from group identifiers to aggregated statistics per field.
-
aggregateAsync
public CompletableFuture<Map<Group, Map<String, DocumentStats.FieldStats>>> aggregateAsync(String... fields) Description copied from interface:GroupSearchAsynchronously performs aggregation over the given fields for each group.This is the asynchronous counterpart of
GroupSearch.aggregate(String...). The returned future completes with the same grouped statistics map as the synchronous method.- Specified by:
aggregateAsyncin interfaceGroupSearch- Parameters:
fields- The fields to aggregate within each group.- Returns:
- A future with a map from group identifiers to aggregated statistics per field.
-