[
https://issues.apache.org/jira/browse/SOLR-3029?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13240923#comment-13240923
]
Yonik Seeley commented on SOLR-3029:
------------------------------------
OK, this may be too much for 3.6.
I tried an example and it looks like there are a couple of places with this
problem.
I edited solr.xml so the name field looked like
{code}
<field name="name">Solr, the Enterprise Search Server solra solrb abcdefgx
abcdefgy</field>
{code}
Then I tried the following spellcheck command:
http://localhost:8983/solr/spell?q=abcdefgq%20solrz&spellcheck=true&spellcheck.collate=true&spellcheck.build=true&spellcheck.collateExtendedResults=true&spellcheck.count=3&spellcheck.maxCollations=3&wt=json&indent=true
{code}
"spellcheck":{
"suggestions":[
"abcdefgq",{
"numFound":2,
"startOffset":0,
"endOffset":8,
"suggestion":["abcdefgx",
"abcdefgy"]},
"solrz",{
"numFound":3,
"startOffset":9,
"endOffset":14,
"suggestion":["solra",
"solrb",
"solr"]},
"collation",[
"collationQuery","abcdefgx solra",
"hits",0,
"misspellingsAndCorrections",[
"abcdefgq","abcdefgx",
"solrz","solra"]]]}}
{code}
Apologies if I'm misinterpreting some things - I don't have much experience
with the spellchecker stuff (other than trying to clean up the tests in the
past).
Observations:
- Unless order is really important, "suggestions" should be a map
- same for "collation" and "misspellingsAndCorrections"
- why is "collation" inside "suggestions" along with other words? should this
be one level higher?
- why isn't this giving me multiple collations... am I misunderstanding the
spellcheck.maxCollations parameter
- why aren't multiple suggestions returned in misspellingsAndCorrections? (and
what's the purpose of this seemingly redundant info anyway?)
- I briefly tried distributed search by adding
&shards=localhost:8983/solr&shards.qt=/spell and I get
{code}
"error":{
"msg":"isShard is only acceptable with search handlers",
"code":400}}
{code}
> 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
> Reporter: Antony Stubbs
> Priority: Blocker
> Attachments: 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 is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.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]