Class GetDocumentStatsResult

java.lang.Object
io.fluxcapacitor.common.api.search.GetDocumentStatsResult
All Implemented Interfaces:
JsonType, RequestResult

public class GetDocumentStatsResult extends Object implements RequestResult
Response to a GetDocumentStats request.

Contains aggregated statistics for documents that matched a SearchQuery, grouped and computed in-memory. Statistics include common numeric metrics like count, min, max, sum, and average, organized per field and optional grouping.

For performance-sensitive use cases or large data sets, prefer GetFacetStats, which is computed by the backing store and generally faster.

See Also:
  • Constructor Details

    • GetDocumentStatsResult

      public GetDocumentStatsResult()
  • Method Details

    • toMetric

      public GetDocumentStatsResult.Metric toMetric()
      Returns a lightweight summary of this result for logging or metric tracking.
      Specified by:
      toMetric in interface JsonType
      Returns:
      a safe and compact object suitable for serialization to the metrics log