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

multivalued dynamicField matching 'score' causes text response writers to output score as an array

    XMLWordPrintableJSON

Details

    Description

      With a schema that includes a dynamic field that matches 'score' (e.g. s* or even just *) text response writers (json, python, etc...) will return score as an array, e.g.:
      "score": [
      17.522964
      ]

      For now, a workaround (courtesy of hoss) is adding a non-indexed, non-stored, non-multivalued 'score' field to schema.xml, e.g.:
      <field name="score" type="string" indexed="false" stored="false" multiValued="false"/>

      Note that this will happen for anybody following the current (or older) example schema.xml where "*" was used to ignore undesired fields (from: SOLR-217):
      https://github.com/apache/lucene-solr/blob/trunk/solr/example/solr/collection1/conf/schema.xml#L214

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              daubman Aaron Daubman
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: