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 Mark Swinson <Ma...@bbc.co.uk> on 2012/02/09 14:37:46 UTC

spell checking and filtering in the same query

Background:

I have an solr index containing foodtypes, chefs, and courses. This is
an initial setup to test my configuration.


Here is the problem I'm trying to solve :

-When I query for a mispelt foodtype 'x' and filter by chef 'c' I should
get a suggested list of foodtypes prepared by chef 'c'


ok:

I've managed to set up a spellcheck component so I can make the
following query:

/suggest?q=ban&spellcheck.dictionary=foodtypes

This gets me the results
'banana bread'
'banoffee pie'

How can I modify this query and the solr configuration to allow me to
filter by another field?

I'm aware the the fq parameter does not work with the SpellCheck
component.
Is there anyway of passing the results of the first query to a filter
query? I've seen various posts
on this topic, but no solutions. The best suggestion was to make the
client make a second request,
which is something I do not want to do.

Is it possible to write a SearchComponent or SearchHandler that chains
results?


Thanks for any help.


Mark








http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.
					

RE: spell checking and filtering in the same query

Posted by "Dyer, James" <Ja...@ingrambook.com>.
Mark,

I'm not as familiar with the Suggester, but with normal spellcheck if you set "spellcheck.maxCollationTries" to something greater than 0 it will check the collations with the index.  This checking includes any "fq" params you had.  So in this sense the SpellCheckComponent does work with "fq".

James Dyer
E-Commerce Systems
Ingram Content Group
(615) 213-4311


-----Original Message-----
From: Mark Swinson [mailto:Mark.Swinson@bbc.co.uk] 
Sent: Thursday, February 09, 2012 7:38 AM
To: solr-user@lucene.apache.org
Subject: spell checking and filtering in the same query

Background:

I have an solr index containing foodtypes, chefs, and courses. This is
an initial setup to test my configuration.


Here is the problem I'm trying to solve :

-When I query for a mispelt foodtype 'x' and filter by chef 'c' I should
get a suggested list of foodtypes prepared by chef 'c'


ok:

I've managed to set up a spellcheck component so I can make the
following query:

/suggest?q=ban&spellcheck.dictionary=foodtypes

This gets me the results
'banana bread'
'banoffee pie'

How can I modify this query and the solr configuration to allow me to
filter by another field?

I'm aware the the fq parameter does not work with the SpellCheck
component.
Is there anyway of passing the results of the first query to a filter
query? I've seen various posts
on this topic, but no solutions. The best suggestion was to make the
client make a second request,
which is something I do not want to do.

Is it possible to write a SearchComponent or SearchHandler that chains
results?


Thanks for any help.


Mark








http://www.bbc.co.uk/
This e-mail (and any attachments) is confidential and may contain personal views which are not the views of the BBC unless specifically stated.
If you have received it in error, please delete it from your system.
Do not use, copy or disclose the information in any way nor act in reliance on it and notify the sender immediately.
Please note that the BBC monitors e-mails sent or received.
Further communication will signify your consent to this.