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

Improve error message when a large value is stored in an indexed string field

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 5.5, 6.0
    • Schema and Analysis
    • None

    Description

      Right now we get the following error if a large text field is indexed into a string field:

      SimplePostTool: WARNING: Response: {"responseHeader":{"status":400,"QTime":580},"error":{"msg":"Exception writing document id dbc798be-9a6e-48b7-8721-31f84e89c10b to the index; possible analysis error.","code":400}}
      

      Neither the offending field is mentioned, nor the common cause of such a problem.

      I will change the error message to say e.g.:

      SimplePostTool: WARNING: Response: {"responseHeader":{"status":400,"QTime":109},"error":{"msg":"Exception writing document id dbc798be-9a6e-48b7-8721-31f84e89c10b to the index; possible analysis error: Document contains at least one immense term in field=\"content\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term is: '[73, 115, 32, 82, 101, 102, 111, 114, 109, 101, 100, 32, 84, 104, 101, 111, 108, 111, 103, 121, 32, 67, 97, 116, 104, 111, 108, 105, 99, 105]...', original message: bytes can be at most 32766 in length; got 35873. Perhaps the document has an indexed string field (solr.StrField) which is too large","code":400}}
      

      Attachments

        1. SOLR-8498.patch
          2 kB
          Shalin Shekhar Mangar

        Activity

          People

            shalin Shalin Shekhar Mangar
            shalin Shalin Shekhar Mangar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: