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

Apache Solr : Error : unknown field _src_

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Invalid
    • 7.5
    • 7.5.1
    • SolrJ, update
    • None

    Description

      I went through this link and added the code in one of core to upload a multilevel JSON and it worked very well but when I created another core and added same then it is throwing the below error. I spent so much time to solve this error but no luck. The error is,

      {{

      { "responseHeader":\{ "status":400, "QTime":93}

      , "error":{ "metadata":[ "error-class","org.apache.solr.common.SolrException", "root-error-class","org.apache.solr.common.SolrException"], "msg":"ERROR: [doc=5b62d25] unknown field 'src'", "code":400}} }}

      I have added the below code in my solrconfig.xml file.

      {{<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> <!- The default search field where all the values are indexed to --> <str name="df">text</str> </lst> </initParams> }}

      It means my entire JSON will be stored against the key src.

      Attachments

        1. schema.xml
          32 kB
          Shubhangi Shinde
        2. solrconfig.xml
          59 kB
          Shubhangi Shinde

        Activity

          People

            Unassigned Unassigned
            shubhangi101089 Shubhangi Shinde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: