Solr
  1. Solr
  2. SOLR-1886

In SolrJ, XMLResponseParser throws an exception when attempting to process a response with spellcheck.extendedResults=true containing word suggestions

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Component/s: spellchecker
    • Labels:
      None

      Description

      This occurs when there are word suggestions.
      The error occurs in the readArray method, the message being: "error reading value:LST"
      The reason for this error is likely that the format of the response with the extendedResults option has unnamed lists.

      Here is an example response where this occurs:
      <response>

      (response header is here)

      <result name="response" numFound="0" start="0"/>
      <lst name="spellcheck">
      <lst name="suggestions">
      <lst name="emaild">
      <int name="numFound">2</int>
      <int name="startOffset">0</int>
      <int name="endOffset">6</int>
      <int name="origFreq">0</int>
      <arr name="suggestion">
      <lst>
      <str name="word">email</str>
      <int name="freq">2</int>
      </lst>
      <lst>
      <str name="word">webmail</str>
      <int name="freq">1</int>
      </lst>
      </arr>
      </lst>
      <bool name="correctlySpelled">false</bool>
      <str name="collation">email</str>
      </lst>
      </lst>
      </response>

      Surrounding the suggestions are unnamed lists.
      Considering the method in XMLResponseParser is named readNamedList, I'm guessing that all lists must be named to avoid this error.

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Nicholas Brozack
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development