[
https://issues.apache.org/jira/browse/SOLR-3029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14052980#comment-14052980
]
Nalini Kartha edited comment on SOLR-3029 at 7/5/14 10:28 PM:
--------------------------------------------------------------
New patch taking into account comments on the JIRA -
* Moved correctlySpelled boolean and collation list out of suggestions. Left
suggestions and collations as NamedLists based on previous comments (maybe
suggestions can also be made a SimpleOrderedMap though?).
* Fixed all spellcheck tests to be compatible with the new response format.
* Changed QueryResponse._spellInfo to a NamedList<Object> instead
NamedList<NamedList<Object>> since correctlySpelled is at top level now.
* Fixed DistributedSpellCheckComponentTest which started failing after this
change - it was asserting that 'suggestions' was not empty for the collate test
but no suggestions were actually being generated (was passing because
correctlySpelled flag was in the 'suggestions' NamedList). Added a new term to
the index which is within 2 edits of the query term ('quicker' and 'quick'
respectively).
cc [~jdyer]
was (Author: nalinikartha):
New patch taking into account comments on the JIRA -
* Moved correctlySpelled boolean and collation list out of suggestions. Left
suggestions and collations as NamedLists based on previous comments (maybe
suggestions can also be made a SimpleOrderedMap though?).
* Fixed all spellcheck tests to be compatible with the new response format.
* Changed QueryResponse._spellInfo to a NamedList<Object> instead
NamedList<NamedList<Object>> since correctlySpelled is at top level now.
* Fixed DistributedSpellCheckComponentTest which started failing after this
change - it was asserting that 'suggestions' was not empty for the collate test
but no suggestions were actually being generated (was passing because
correctlySpelled flag was in the 'suggestions' NamedList). Added a new term to
the index which is within 2 edits of the query term ('quicker' and 'quick'
respectively).
> Poor json formatting of spelling collation info
> -----------------------------------------------
>
> Key: SOLR-3029
> URL: https://issues.apache.org/jira/browse/SOLR-3029
> Project: Solr
> Issue Type: Bug
> Components: spellchecker
> Affects Versions: 4.0-ALPHA
> Reporter: Antony Stubbs
> Fix For: 4.9, 5.0
>
> Attachments: SOLR-3029.patch, SOLR-3029.patch
>
>
> {noformat}
> "spellcheck": {
> "suggestions": [
> "dalllas",
> {
> <snip>
> {
> "word": "canallas",
> "freq": 1
> }
> ]
> },
> "correctlySpelled",
> false,
> "collation",
> "dallas"
> ]
> }
> {noformat}
> The correctlySpelled and collation key/values are stored as consecutive
> elements in an array - quite odd. Is there a reason isn't not a key/value map
> like most things?
--
This message was sent by Atlassian JIRA
(v6.2#6252)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]