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 roz dev <ro...@gmail.com> on 2013/03/01 01:33:25 UTC

can we configure spellcheck to be invoked after request processing?

Hi All,
I may be asking a stupid question but please bear with me.

Is it possible to configure Spell check to be invoked after Solr has
processed the original query?

My use case is :

I am using DirectSpellChecker and have a document which has "Denim" as a
term and there is another document which has "Jeap".

I am issuing a Search as "Jean" or "Denim"

I am finding that this Solr query is giving me ZERO results and suggesting
"Jeap" as an alternative.

I want Solr to try to run the query for "Jean" or "Denim" and if there are
no results found then only suggest "Jeap" as an alternative

Is this doable in Solr?

Any suggestions.

-Saroj

Re: can we configure spellcheck to be invoked after request processing?

Posted by roz dev <ro...@gmail.com>.
James,

You are right. I was setting up spell checker incorrectly.

It works correctly as you described.

Spell checker is invoked after the query component and it does not stop
Solr from executing query.

Thanks for correcting me.
Saroj





On Fri, Mar 1, 2013 at 7:30 AM, Dyer, James <Ja...@ingramcontent.com>wrote:

> I'm a little confused here because if you are searching q=jeap OR denim ,
> then you should be getting both documents back.  Having spellcheck
> configured does not affect your search results at all.  Having it in your
> request will sometime result in spelling suggestions, usually if one or
> more terms you queried is not in the index.  But if all of your query terms
> are optional then you need only have 1 term match anything to get results.
>  You should get the same results regardless of whether or not you have
> spellcheck in the request.
>
> While spellcheck does not affect your query results, the results do affect
> spellcheck.  This is why you should put spellcheck in the "last-components"
> section of your request handler configuration.  This ensures that the query
> is run before spellcheck.
>
> James Dyer
> Ingram Content Group
> (615) 213-4311
>
>
> -----Original Message-----
> From: roz dev [mailto:rozdev29@gmail.com]
> Sent: Thursday, February 28, 2013 6:33 PM
> To: solr-user@lucene.apache.org
> Subject: can we configure spellcheck to be invoked after request
> processing?
>
> Hi All,
> I may be asking a stupid question but please bear with me.
>
> Is it possible to configure Spell check to be invoked after Solr has
> processed the original query?
>
> My use case is :
>
> I am using DirectSpellChecker and have a document which has "Denim" as a
> term and there is another document which has "Jeap".
>
> I am issuing a Search as "Jean" or "Denim"
>
> I am finding that this Solr query is giving me ZERO results and suggesting
> "Jeap" as an alternative.
>
> I want Solr to try to run the query for "Jean" or "Denim" and if there are
> no results found then only suggest "Jeap" as an alternative
>
> Is this doable in Solr?
>
> Any suggestions.
>
> -Saroj
>
>

RE: can we configure spellcheck to be invoked after request processing?

Posted by "Dyer, James" <Ja...@ingramcontent.com>.
I'm a little confused here because if you are searching q=jeap OR denim , then you should be getting both documents back.  Having spellcheck configured does not affect your search results at all.  Having it in your request will sometime result in spelling suggestions, usually if one or more terms you queried is not in the index.  But if all of your query terms are optional then you need only have 1 term match anything to get results.  You should get the same results regardless of whether or not you have spellcheck in the request.

While spellcheck does not affect your query results, the results do affect spellcheck.  This is why you should put spellcheck in the "last-components" section of your request handler configuration.  This ensures that the query is run before spellcheck.

James Dyer
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: roz dev [mailto:rozdev29@gmail.com] 
Sent: Thursday, February 28, 2013 6:33 PM
To: solr-user@lucene.apache.org
Subject: can we configure spellcheck to be invoked after request processing?

Hi All,
I may be asking a stupid question but please bear with me.

Is it possible to configure Spell check to be invoked after Solr has
processed the original query?

My use case is :

I am using DirectSpellChecker and have a document which has "Denim" as a
term and there is another document which has "Jeap".

I am issuing a Search as "Jean" or "Denim"

I am finding that this Solr query is giving me ZERO results and suggesting
"Jeap" as an alternative.

I want Solr to try to run the query for "Jean" or "Denim" and if there are
no results found then only suggest "Jeap" as an alternative

Is this doable in Solr?

Any suggestions.

-Saroj


Re: can we configure spellcheck to be invoked after request processing?

Posted by Jack Krupansky <ja...@basetechnology.com>.
You can execute search components in any order you want, but their execution 
will be unconditional, so you would be best off to invoke spellcheck in your 
application layer. In other words, a second call to Solr, but only if no 
results were found.

-- Jack Krupansky

-----Original Message----- 
From: roz dev
Sent: Thursday, February 28, 2013 7:33 PM
To: solr-user@lucene.apache.org
Subject: can we configure spellcheck to be invoked after request processing?

Hi All,
I may be asking a stupid question but please bear with me.

Is it possible to configure Spell check to be invoked after Solr has
processed the original query?

My use case is :

I am using DirectSpellChecker and have a document which has "Denim" as a
term and there is another document which has "Jeap".

I am issuing a Search as "Jean" or "Denim"

I am finding that this Solr query is giving me ZERO results and suggesting
"Jeap" as an alternative.

I want Solr to try to run the query for "Jean" or "Denim" and if there are
no results found then only suggest "Jeap" as an alternative

Is this doable in Solr?

Any suggestions.

-Saroj