Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-14937

client.queryDefaults().set(...) misunderstanding in JSON facet tests

    XMLWordPrintableJSON

Details

    • Test
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 8.8, 9.0
    • None
    • None

    Description

      I noticed today that we have

      client.queryDefaults().set("shards", "foo", "debugQuery", "bar");
      

      style usage in some tests and whilst this was likely intended to result in

      { "shards" : "foo", "debugQuery" : "bar" }
      

      query defaults it actually results in

      { "shards" : [ "foo", "debugQuery" , "bar" ] }
      

      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

      client.queryDefaults().set("shards", "foo").set("debugQuery", "bar");
      

      style usage.

      Attachments

        Activity

          People

            cpoerschke Christine Poerschke
            cpoerschke Christine Poerschke
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m