I wanted to first bring this up and see if people agree before opening the
ticket:
This is an example of a Solr 6 spellcheck response:
{
"responseHeader": {
"status": 0,
"QTime": 739
},
"_original_parameters_":
"org.apache.solr.common.params.MultiMapSolrParams:carrot.url=id&spellcheck.collateExtendedResults=true&qt=/afts&carrot.produceSummary=true&spellcheck.maxCollations=3&start=0&spellcheck.maxCollationTries=5&rows=6&spellcheck.alternativeTermCount=2&spellcheck.extendedResults=false&q=suggest:YYYYY&defType=afts&spellcheck.maxResultsForSuggest=5&spellcheck=true&carrot.outputSubClusters=false&spellcheck.count=5&wt=json&carrot.title=mltext@m___t
@{
http://www.alfresco.org/model/content/1.0}title&carrot.snippet=content@s___t@{http://www.alfresco.org/model/content/1.0}content&spellcheck.collate=true
",
"_field_mappings_": {},
"_date_mappings_": {},
"_range_mappings_": {},
"_pivot_mappings_": {},
"_interval_mappings_": {},
"_stats_field_mappings_": {},
"_stats_facet_mappings_": {},
"_facet_function_mappings_": {},
"response": {
"numFound": 0,
"start": 0,
"docs": []
},
"spellcheck": {
"suggestions": ["yyyyy", {
"numFound": 2,
"startOffset": 8,
"endOffset": 13,
"suggestion": ["yyyyyya", "yyyyyyy"]
}],
"collation": {
"collationQuery": "suggest:yyyyyya",
"collationQueryString": "suggest:yyyyyya",
"hits": 1,
"misspellingsAndCorrections": ["yyyyy", "yyyyyya"]
},
"collation": {
"collationQuery": "suggest:yyyyyyy",
"collationQueryString": "suggest:yyyyyyy",
"hits": 1,
"misspellingsAndCorrections": ["yyyyy", "yyyyyyy"]
}
}
Notice the repeating collation keys in the spellcheck object. With most
parsers the last collation will overwrite the first collation.
This change was introduced in
https://issues.apache.org/jira/browse/SOLR-3029.
Before I create the ticket, I wanted check and see if I'm missing something
here.
Joel Bernstein
http://joelsolr.blogspot.com/