Class Group
java.lang.Object
io.fluxcapacitor.common.api.search.Group
Represents a group key for aggregating documents in
DocumentStats
.
A Group
consists of one or more path-value pairs used to categorize documents
during aggregation. Each group corresponds to a unique combination of values across
the specified groupBy
paths.
Groups are typically created during the in-memory computation of statistics in a
GetDocumentStatsResult
, and identify which
subset of documents a given DocumentStats
applies to.
Example:
If grouping on "status"
and "region"
, one Group
might contain:
{"status": "active", "region": "EU"}
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Group
-
-
Method Details
-
of
Creates aGroup
from an even-length list of alternating keys and values.- Parameters:
pathsAndValues
- An array of alternating path names and their corresponding values- Returns:
- A new
Group
instance - Throws:
IllegalArgumentException
- if the number of elements is odd
-
get
Returns the value associated with the given path in this group.- Parameters:
path
- the path name- Returns:
- the grouped value, or
null
if not present
-