You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ashish Mukherjee <as...@gmail.com> on 2015/03/07 15:27:14 UTC

SpellCheck component query

Hello,

I have enabled the Spellcheck component in Solr, which gives me spelling
suggestions. However, I would like those suggestions to be applied in the
same select request handler to retrieve additional results based on the
suggestions. How can this be achieved with Solr?

Regards,
Ashish

RE: SpellCheck component query

Posted by "Reitzel, Charles" <Ch...@tiaa-cref.org>.
Hi Ashish,

We are doing some very close to what you describe.   As Aman says, it requires two solr queries to achieve that result.   

I.e. you need to build this logic into your application.  Solr won't do it for you.    In our case, for the second query, we use a faceted results against an ngram filtered field to get valid terms.

hth,
Charlie

-----Original Message-----
From: Ashish Mukherjee [mailto:ashish.mukherjee@gmail.com] 
Sent: Monday, March 09, 2015 1:55 AM
To: solr-user@lucene.apache.org
Cc: amantandon.10@gmail.com
Subject: Re: SpellCheck component query

Hi Aman,

Thanks for your response.

Taking your example further to elaborate what I am looking to do -

if user types 'chai' and suggestion is 'chat' , then I would like to see all the values which 'chat' in them as suggestions, such as 'text chat', 'video chat', 'audio chat' etc. without making another search request for 'chat'.

Can this be accomplished?

Regards,
Ashish

On Mon, Mar 9, 2015 at 2:50 AM, Aman Tandon <am...@gmail.com> wrote:

> Hi,
>
> AFAIK solr currently not providing this feature.
>
> Suppose a scenario, the user is trying to search for "chai" (hindi 
> meaning of tea). And in your index you have more documents containing 
> the keyword "chat" as compared to the the keyword "chai".
>
> chat => 501
> chai => 29
>
> and the maxQueryFrequency is 25.
>
> So solr will suggest you chat as this term is present in more 
> documents and if you want from solr to search internally for the 
> suggestion then you will be displaying he results of chat to the user 
> when the user intended to search for chai.
>
> So I suppose it is good to show wrong suggestion instead of providing 
> the inappropriate results to the user.
>
> In this case you could the show the chat and chai as suggestion to the 
> user and then he could select the appropriate suggestion.
>
> With Regards
> Aman Tandon
>
> On Sat, Mar 7, 2015 at 7:57 PM, Ashish Mukherjee < 
> ashish.mukherjee@gmail.com
> > wrote:
>
> > Hello,
> >
> > I have enabled the Spellcheck component in Solr, which gives me 
> > spelling suggestions. However, I would like those suggestions to be 
> > applied in the same select request handler to retrieve additional 
> > results based on the suggestions. How can this be achieved with Solr?
> >
> > Regards,
> > Ashish
> >
>

*************************************************************************
This e-mail may contain confidential or privileged information.
If you are not the intended recipient, please notify the sender immediately and then delete it.

TIAA-CREF
*************************************************************************

Re: SpellCheck component query

Posted by Ashish Mukherjee <as...@gmail.com>.
Hi Aman,

Thanks for your response.

Taking your example further to elaborate what I am looking to do -

if user types 'chai' and suggestion is 'chat' , then I would like to see
all the values which 'chat' in them as suggestions, such as 'text chat',
'video chat', 'audio chat' etc. without making another search request for
'chat'.

Can this be accomplished?

Regards,
Ashish

On Mon, Mar 9, 2015 at 2:50 AM, Aman Tandon <am...@gmail.com> wrote:

> Hi,
>
> AFAIK solr currently not providing this feature.
>
> Suppose a scenario, the user is trying to search for "chai" (hindi meaning
> of tea). And in your index you have more documents containing the keyword
> "chat" as compared to the the keyword "chai".
>
> chat => 501
> chai => 29
>
> and the maxQueryFrequency is 25.
>
> So solr will suggest you chat as this term is present in more documents and
> if you want from solr to search internally for the suggestion then you will
> be displaying he results of chat to the user when the user intended to
> search for chai.
>
> So I suppose it is good to show wrong suggestion instead of providing the
> inappropriate results to the user.
>
> In this case you could the show the chat and chai as suggestion to the user
> and then he could select the appropriate suggestion.
>
> With Regards
> Aman Tandon
>
> On Sat, Mar 7, 2015 at 7:57 PM, Ashish Mukherjee <
> ashish.mukherjee@gmail.com
> > wrote:
>
> > Hello,
> >
> > I have enabled the Spellcheck component in Solr, which gives me spelling
> > suggestions. However, I would like those suggestions to be applied in the
> > same select request handler to retrieve additional results based on the
> > suggestions. How can this be achieved with Solr?
> >
> > Regards,
> > Ashish
> >
>

Re: SpellCheck component query

Posted by Aman Tandon <am...@gmail.com>.
Hi,

AFAIK solr currently not providing this feature.

Suppose a scenario, the user is trying to search for "chai" (hindi meaning
of tea). And in your index you have more documents containing the keyword
"chat" as compared to the the keyword "chai".

chat => 501
chai => 29

and the maxQueryFrequency is 25.

So solr will suggest you chat as this term is present in more documents and
if you want from solr to search internally for the suggestion then you will
be displaying he results of chat to the user when the user intended to
search for chai.

So I suppose it is good to show wrong suggestion instead of providing the
inappropriate results to the user.

In this case you could the show the chat and chai as suggestion to the user
and then he could select the appropriate suggestion.

With Regards
Aman Tandon

On Sat, Mar 7, 2015 at 7:57 PM, Ashish Mukherjee <ashish.mukherjee@gmail.com
> wrote:

> Hello,
>
> I have enabled the Spellcheck component in Solr, which gives me spelling
> suggestions. However, I would like those suggestions to be applied in the
> same select request handler to retrieve additional results based on the
> suggestions. How can this be achieved with Solr?
>
> Regards,
> Ashish
>