Skip to content

SOLR-8088: Grouping on a multiValued non-numeric field is rejected up front with a 400 error - #5144

Draft
nick-boss-tech wants to merge 7 commits into
apache:mainfrom
nick-boss-tech:solr-8088-submit
Draft

nick-boss-tech wants to merge 7 commits into
apache:mainfrom
nick-boss-tech:solr-8088-submit

Conversation

@nick-boss-tech

@nick-boss-tech nick-boss-tech commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

🤖 AI text below 🤖 (posted on behalf of Nick Shanin)

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

What happens today

Distributed grouping on a multiValued non-numeric field is accepted, then fails later inside Lucene.

A distributed grouped query can name a multiValued field, such as cat in the test schema. The search-phase command builder checks only that its required fields are set (SearchGroupsFieldCommand.java lines 68-74 at the merge-base). Nothing checks the field type there. The grouping code then reads the field as single valued docValues, and the request fails inside Lucene with an IllegalStateException about docValues.

What this change does

Grouping on a multiValued non-numeric field is rejected up front with a 400 error.

Proof

A new test fails on the base code and passes with this change.

  • SearchGroupsFieldCommandTest.testMultiValuedFieldIsRejected (test lines 33-49) builds the command for a multiValued field and expects a 400 error. On the base code the builder returns normally, so the expected error never comes.
  • Verified 2026-10-14 at head c36cfc0: SearchGroupsFieldCommandTest 2 of 2. On the base code, with this test in place, the class runs 2 tests and one fails: this test.

Limits

Numeric multiValued fields are not checked.

  • Grouping on a multiValued field that works end to end is a larger change, and it is not made here. I can open a follow-up ticket and PR for it on request.

Changelog: changelog/unreleased/SOLR-8088-grouping-multivalued.yml

AI assistance

AI agents assisted with research, implementation, review, and drafting. Nick Shanin directed the work and takes responsibility for this contribution.

@nick-boss-tech nick-boss-tech changed the title SOLR-8088: Grouping on a multiValued field is rejected up front with a 400 error SOLR-8088: Grouping on a multiValued non-numeric field is rejected up front with a 400 error Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant