Christine Poerschke created SOLR-14937:
------------------------------------------

             Summary: lient.queryDefaults().set(...) misunderstanding in JSON 
facet tests
                 Key: SOLR-14937
                 URL: https://issues.apache.org/jira/browse/SOLR-14937
             Project: Solr
          Issue Type: Test
            Reporter: Christine Poerschke
            Assignee: Christine Poerschke


I noticed today that we have
{code:java}
client.queryDefaults().set("shards", "foo", "debugQuery", "bar");
{code}
style usage in some tests and whilst this was likely intended to result in
{code:java}
{ "shards" : "foo", "debugQuery" : "bar" }
{code}
query defaults it actually results in
{code:java}
{ "shards" : [ "foo", "debugQuery" , "bar" ] }
{code}
query defaults based on the {{ModifiableSolrParams.set}} implementation: 
[https://github.com/apache/lucene-solr/blob/releases/lucene-solr/8.6.3/solr/solrj/src/java/org/apache/solr/common/params/ModifiableSolrParams.java#L86-L96]

A possible alternative is
{code:java}
client.queryDefaults().set("shards", "foo").set("debugQuery", "bar");
{code}
style usage.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to