[ 
https://issues.apache.org/jira/browse/SOLR-18246?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18082522#comment-18082522
 ] 

Christos Malliaridis edited comment on SOLR-18246 at 5/21/26 9:00 AM:
----------------------------------------------------------------------

I have some questions about the previous and new state, maybe we can document 
here the answers.

Specifying a {{facet.field}} multiple times is a bit weird, but at the same 
time problematic in json format. Valid json does not allow duplicate keys, so 
we would have to use an array instead of a string. What was the preivous type 
for the json in v2, and what is the new type of the json field?

If there is a type change from string to array it would be a breaking 
change,regardless of what the documentation says.

In query parameters defining {{facet.field}} in multiple times is normally 
interpreted as array. The old admin UI was escaping the semicolon / or commas, 
so providing in the facet field the value {{field1,field2}} would become 
{{field1%2Cfield2}}

What happens if someone defines the query parameter with an actual comma? Would 
it interpret it the same way as providing the query parameter multiple times?

Thanks for the PR and resolution. I'm asking only because I want to clarify it 
for myself and know how to address it in the new UI once I reach that point.


was (Author: JIRAUSER305622):
I have some questions about the previous and new state, maybe we can document 
here the answers.

Specifying a {{facet.field}} multiple times is a bit weird, but at the same 
time problematic in json format. Valid json does not allow duplicate keys, so 
we would have to use an array instead of a string. What was the preivous type 
for the json in v2, and what is the new type of the json field?

If there is a type change from string to array it would be a breaking 
change,regardless of what the documentation says.

In query parameters defining {{facet.field}} in multiple times is normally 
interpreted as array. The old admin UI was escaping the semicolon / or commas, 
so providing in the facet field the value {{field1,field2}} would become 
{{field1%2Cfield2

What happens if someone defines the query parameter with an actual comma? Would 
it interpret it the same way as providing the query parameter multiple times?}}

> 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
>
>          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]

Reply via email to