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

let /update/json/docs store the source json as well

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0, 6.0
    • Component/s: None
    • Labels:

      Description

      it is a common requirement to store the entire JSON as a field in Solr.

      we can have a extra param srcField=field_name to specify the field name

      the /update/json/docs is only useful when all the json fields are predefined or in schemaless mode.

      The better option would be to store the content in a store only field and index the data in another field in other modes

      the relevant section in solrconfig.xml

       <initParams path="/update/json/docs">
          <lst name="defaults">
            <!--this ensures that the entire json doc will be stored verbatim into one field-->
            <str name="srcField">_src</str>
            <!--This means a the uniqueKeyField will be extracted from the fields and
             all fields go into the 'df' field. In this config df is already configured to be 'text'
              -->
            <str name="mapUniqueKeyOnly">true</str>
             <str name="df">text</str>
          </lst>
      
        </initParams>
      

        Attachments

        1. SOLR-6633.patch
          25 kB
          Noble Paul
        2. SOLR-6633.patch
          19 kB
          Noble Paul

          Issue Links

            Activity

              People

              • Assignee:
                noble.paul Noble Paul
                Reporter:
                noble.paul Noble Paul
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: