Solr
  1. Solr
  2. SOLR-8498

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

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.5, 6.0
    • Component/s: Schema and Analysis
    • Labels:
      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}}
      
      1. SOLR-8498.patch
        2 kB
        Shalin Shekhar Mangar

        Activity

        Hide
        Shalin Shekhar Mangar added a comment -

        Trivial patch

        Show
        Shalin Shekhar Mangar added a comment - Trivial patch
        Hide
        ASF subversion and git services added a comment -

        Commit 1723419 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1723419 ]

        SOLR-8498: Improve error message when a large value is stored in an indexed string field

        Show
        ASF subversion and git services added a comment - Commit 1723419 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1723419 ] SOLR-8498 : Improve error message when a large value is stored in an indexed string field
        Hide
        ASF subversion and git services added a comment -

        Commit 1723421 from shalin@apache.org in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1723421 ]

        SOLR-8498: Improve error message when a large value is stored in an indexed string field

        Show
        ASF subversion and git services added a comment - Commit 1723421 from shalin@apache.org in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1723421 ] SOLR-8498 : Improve error message when a large value is stored in an indexed string field

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Shalin Shekhar Mangar
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development