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 Details

    • DefaultGroupSearch

      protected DefaultGroupSearch()
  • Method Details

    • aggregate

      public Map<Group, Map<String, DocumentStats.FieldStats>> aggregate(String... fields)
      Description copied from interface: GroupSearch
      Performs aggregation over the given fields for each group.

      Each Group represents 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:
      aggregate in interface GroupSearch
      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: GroupSearch
      Asynchronously 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:
      aggregateAsync in interface GroupSearch
      Parameters:
      fields - The fields to aggregate within each group.
      Returns:
      A future with a map from group identifiers to aggregated statistics per field.