You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by Joel Bernstein <jo...@gmail.com> on 2016/10/03 18:19:44 UTC

Broken spellcheck format for Solr 5 and 6?

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/

Re: Broken spellcheck format for Solr 5 and 6?

Posted by Joel Bernstein <jo...@gmail.com>.
Sorry, this was my mistake. After further digging the problem appears to on
the Alfresco side of things.

Joel Bernstein
http://joelsolr.blogspot.com/

On Mon, Oct 3, 2016 at 2:19 PM, Joel Bernstein <jo...@gmail.com> wrote:

> 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/
>