Skip to content

feat(search): add skip_aggregation_finalization to SearchRequest#6145

Open
congx4 wants to merge 5 commits intomainfrom
congxie/add-skip-aggregation-finalization
Open

feat(search): add skip_aggregation_finalization to SearchRequest#6145
congx4 wants to merge 5 commits intomainfrom
congxie/add-skip-aggregation-finalization

Conversation

@congx4
Copy link
Contributor

@congx4 congx4 commented Feb 6, 2026

Summary

Add an optional skip_aggregation_finalization field to SearchRequest that, when set to true, skips the finalization of aggregation results in root.rs and returns the raw IntermediateAggregationResults bytes instead.

This enables callers (e.g., CloudPrem/Pomsky) to handle intermediate aggregation results directly for multi-step query merging.

Changes

  • search.proto: Added optional bool skip_aggregation_finalization = 19 to SearchRequest.
  • root.rs: Modified finalize_aggregation_if_any() to return intermediate bytes directly when the flag is true.
  • rest_handler.rs (search API + elasticsearch API): Set skip_aggregation_finalization: None in SearchRequest construction.

Add optional bool field to SearchRequest that, when true, skips
finalization of aggregation results in root.rs and returns the raw
IntermediateAggregationResults bytes instead. This enables callers
to handle intermediate results directly for multi-step query merging.

// When true, skip finalization of aggregation results and return
// the raw IntermediateAggregationResults bytes instead.
optional bool skip_aggregation_finalization = 19;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove the optional, because the default boolean value is false in protobuf.

@congx4 congx4 requested a review from guilload February 6, 2026 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants