Class DocumentStats
java.lang.Object
io.fluxcapacitor.common.api.search.DocumentStats
Represents aggregate statistics for a group of documents, including values for specified fields.
Grouping is defined by a Group
key (based on document field values), and statistics are
computed per requested field path.
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Statistical summary for a single document field. -
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
DocumentStats
public DocumentStats()
-
-
Method Details
-
compute
public static List<DocumentStats> compute(Stream<Document> documents, List<String> fields, List<String> groupBy) Computes document statistics from a stream of documents.- Parameters:
documents
- Stream of input documentsfields
- Fields to compute statistics forgroupBy
- Paths to group by- Returns:
- A list of
DocumentStats
, one per group
-