Interface GroupSearch
- All Known Implementing Classes:
DefaultDocumentStore.DefaultSearch.DefaultGroupSearch
public interface GroupSearch
Represents a grouped search query in the Fluxzero search framework.
This interface is typically obtained from a Search instance via Search.groupBy(String...).
It allows aggregations to be performed within groups defined by one or more field values.
Each unique combination of the specified group fields defines a Group, and aggregate results
are computed separately for each group.
For example, if grouping by "country" and aggregating "revenue",
the result will contain one entry per country with the aggregated revenue statistics per group.
Usage Example
Map<Group, Map<String, FieldStats>> revenueByCountry = search.groupBy("country").aggregate("revenue");
- See Also:
-
Method Summary
-
Method Details
-
aggregate
Performs 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.- Parameters:
fields- The fields to aggregate within each group.- Returns:
- A map from group identifiers to aggregated statistics per field.
-
count
-