[
https://issues.apache.org/jira/browse/SOLR-18246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18082528#comment-18082528
]
Umut Saribiyik commented on SOLR-18246:
---------------------------------------
Thanks for the questions [~malliaridis]
This change is not related to the JSON/v2 request body. The Admin UI query
screen still builds regular query parameters. The change is only about how
multiple facet.field values are represented in the query string.
Previously, the UI effectively handled facet.field as a single value. With this
change, the UI state can contain multiple values, but they are serialized as
repeated query parameters, for example:
facet.field=field1&facet.field=field2
So this should not change any JSON field type from string to array.
Regarding commas: entering field1,field2 did not work as multiple facet fields
in my testing. It was treated as one value, escaped as field1%2Cfield2, and
Solr interpreted it as a single facet field name rather than two separate
facet.field parameters.
So the intended behavior of this PR is only to generate repeated query
parameters for multiple facet fields, not to interpret comma-separated values
as multiple fields.
This is the old behavior :
!image-2026-05-21-11-33-12-514.png|width=1397,height=841!
!image-2026-05-21-11-36-16-007.png!
With the previous behavior, it was effectively not possible to request more
than one facet field from the Admin UI query screen, because multiple values
were serialized as a single {{facet.field}} value instead of repeated
{{facet.field}} parameters.
> Solr Admin UI does not support multiple facet.field parameters correctly
> ------------------------------------------------------------------------
>
> Key: SOLR-18246
> URL: https://issues.apache.org/jira/browse/SOLR-18246
> Project: Solr
> Issue Type: Bug
> Components: Admin UI, query
> Affects Versions: 10.0, 9.10.1
> Reporter: Umut Saribiyik
> Assignee: Eric Pugh
> Priority: Minor
> Labels: pull-request-available
> Fix For: 10.1
>
> Attachments: image-2026-05-18-12-47-42-233.png,
> image-2026-05-18-12-47-55-672.png, image-2026-05-18-12-48-29-492.png,
> image-2026-05-18-12-48-54-341.png, image-2026-05-21-11-33-12-514.png,
> image-2026-05-21-11-36-16-007.png
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> h2. Description
> In the Solr Admin UI Query screen, it is possible to enable faceting and
> enter a value for {{{}facet.field{}}}.
> Using a single facet field works as expected. However, when trying to facet
> on multiple fields, the UI appears to generate a single {{facet.field}}
> parameter containing multiple values, for example:
> {code:java}
> facet.field=foo,bar {code}
> This does not work as expected, because Solr treats {{foo,bar}} as one facet
> field value.
> The correct request should repeat the {{facet.field}} parameter for each
> field, for example:
> {code:java}
> facet.field=foo&facet.field=bar {code}
> I also tried using the raw parameters area, but the generated request still
> seems to combine the values into a single {{facet.field}} parameter.
>
> h2. Steps to reproduce
> # Open the Solr Admin UI.
> # Select a collection.
> # Go to the Query screen.
> # Enable {{{}facet{}}}.
> # Enter more than one field for {{{}facet.field{}}}, for example
> {{{}foo,bar{}}}.
> # Execute the query.
> h2. Actual behavior
> The UI generates a request similar to:
> {code:java}
> facet.field=foo,bar {code}
> Solr treats this as a single facet field value, and the expected facets for
> both fields are not returned.
> h2. Expected behavior
> The UI should generate repeated {{facet.field}} parameters, for example:
> {code:java}
> facet.field=foo&facet.field=bar {code}
> This would allow users to facet on multiple fields from the Admin UI.
> h2. Additional note
> The same problem also occurs when using the raw parameters area. It is
> possible to enter multiple {{facet.field}} values there, but the request is
> still generated incorrectly, for example as:
> {code:java}
> facet.field=foo,bar {code}
> instead of:
> {code:java}
> facet.field=foo&facet.field=bar {code}
>
> So the raw parameters area does not avoid the issue.
> In addition, the dedicated {{facet.field}} input should support multiple
> facet fields correctly on its own. Users should not have to rely on raw
> parameters for this basic faceting use case.
>
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]