In SolrJ, XMLResponseParser throws an exception when attempting to process a
response with spellcheck.extendedResults=true containing word suggestions
------------------------------------------------------------------------------------------------------------------------------------------------------
Key: SOLR-1886
URL: https://issues.apache.org/jira/browse/SOLR-1886
Project: Solr
Issue Type: Bug
Components: spellchecker
Affects Versions: 1.4
Reporter: Nicholas Brozack
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]