[ 
https://issues.apache.org/jira/browse/SOLR-9972?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Christine Poerschke updated SOLR-9972:
--------------------------------------
    Attachment: SOLR-9972-hunch-no-test.patch

Attached patch is my hunch as code (without tests).

I have used the {{bin/solr -e techproducts}} example and the 
http://localhost:8983/solr/techproducts/spell?df=text&spellcheck.q=delll+ultra+sharp&spellcheck=true&spellcheck.collateParam.q.op=AND
 query mentioned in the Solr Reference Guide's [Spell 
Checking|https://cwiki.apache.org/confluence/display/solr/Spell+Checking] to 
obtain a response with a collationQuery element, similar to the response above.

The patch would also need a test e.g. in SpellCheckComponentTest class.

----

An alternative, wider reaching solution might be to try and remove the 
"collation" elements within the "collations" element. Links into the code:
* 
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java#L303-L322
* 
https://github.com/apache/lucene-solr/blob/master/solr/core/src/java/org/apache/solr/handler/component/SpellCheckComponent.java#L439-L456


> JSON-Specific Parameters arrntv causing some error for spellcheck component
> ---------------------------------------------------------------------------
>
>                 Key: SOLR-9972
>                 URL: https://issues.apache.org/jira/browse/SOLR-9972
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Response Writers
>    Affects Versions: 6.4
>            Reporter: Ricky Oktavianus Lazuardy
>            Assignee: Christine Poerschke
>         Attachments: SOLR-9972-hunch-no-test.patch
>
>
> So I tried using the new array named list arrntv from solr 6.5 jenkins build
> but the json returned was broken when it returned response for spellcheck 
> with word break.
> for example :
> {code:javascript}
>  {"name":"collation",{
>         "type":"str","value":"collationQuery":"indomie kuing",
>         "hits":81,
>         "misspellingsAndCorrections":
>         [
>           {"name":"indomee","type":"str","value":"indomie"},
>           {"name":"kuih","type":"str","value":"kuing"}
>         ]}
>  }
> {code}
> as you may see that "collationQuery":"indomie kuing" was considered as value 
> thus causing the json to fail.
> i think the correct json was :
> {code:javascript}
> {"name":"collation",
>         "type":"object",
>         "value":{
>         "collationQuery":"indomie kuing",
>         "hits":81,
>         "misspellingsAndCorrections":
>         [
>           {"name":"indomee","type":"str","value":"indomie"},
>           {"name":"kuih","type":"str","value":"kuing"}
>         ]}
>  }
> {code}
> sorry for bad grammar english was not my first language and i know that 
> object was not supported by current arrntv options.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to