Skip to content

SOLR-18221 Add support for percentile in rollup for streaming expressions#4504

Open
KhushJain wants to merge 1 commit into
apache:mainfrom
KhushJain:SOLR-18221-v2
Open

SOLR-18221 Add support for percentile in rollup for streaming expressions#4504
KhushJain wants to merge 1 commit into
apache:mainfrom
KhushJain:SOLR-18221-v2

Conversation

@KhushJain
Copy link
Copy Markdown
Contributor

https://issues.apache.org/jira/browse/SOLR-18221

Description

Added support for per(col, percentile) metric in rollup() streaming expressions.
The per(col, percentile) metric in rollup() streaming expressions was non-functional; the PercentileMetric class was a stub copy-pasted from MaxMetric that returned garbage values.

Solution

Implemented PercentileMetric using T-Digest (AVLTreeDigest, compression=100), matching the server-side PercentileAgg used by facet() and stats(). Supports decimal percentiles (e.g., per(a_i, 99.9)).

Tests

testPercentileRollupStream: validates per() with multiple percentiles (0, 50, 99.9, 100)

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide
  • I have added a changelog entry for my change

@github-actions github-actions Bot added documentation Improvements or additions to documentation dependencies Dependency upgrades client:solrj tool:build tests labels Jun 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

client:solrj dependencies Dependency upgrades documentation Improvements or additions to documentation tests tool:build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant