lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From TK Solr <tksol...@sonic.net>
Subject Re: Spellcheck on specified fields?
Date Tue, 07 Apr 2020 22:57:21 GMT
Correction. "mark seattle" query doesn't show suggestions since "mark" alone has 
some hits.
It is when the same logic is used for a single term query of "seatle" that 3 
suggestions of "seattle"
are returned. Do I have to identify the field by using startOffset value?

On 4/7/20 3:46 PM, TK Solr wrote:
> I query on multiple field like:
>
> q=city:(mark seattle) name:(mark seattle) phone:(mark seattle)&spellcheck=true
>
> The raw query terms are distributed to all fields because I don't know what 
> term is intended to for which field.
>
> If I misspell seattle, I get 3 suggestions:
>
> "spellcheck":{
>     "suggestions":[
>       "seatle",{
>         "numFound":1,
>         "startOffset":29,
>         "endOffset":35,
>         "suggestion":["seattle"]},
>       "seatle",{
>         "numFound":1,
>         "startOffset":50,
>         "endOffset":56,
>         "suggestion":["seattle"]},
>       "seatle",{
>         "numFound":1,
>         "startOffset":73,
>         "endOffset":79,
>         "suggestion":["seattle"]}]}}
>
> (Please disregard exact numbers. It's from more complicated query of the same 
> nature.)
>
> I think it's showing a correction suggestion for each query field.
>
> Since the phone field keeps a phone number and spelling corrections are not 
> very useful,
> I would like the spellchecker to skip this and similar fields but I don't see 
> a relevant
> parameter in spellchecker's documentation. Is there any way to specify the
> fields I am interested or I am not interested?
>
> TK
>
>
>

Mime
View raw message