lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyer, James" <>
Subject RE: Converting fq params to Filter object
Date Thu, 27 Dec 2012 21:28:00 GMT

Assuming that you're using Solr, the hook into the collate functionality is in SpellCheckComponent#addCollationsToResponse
.  To do what you want, you would have to modify the call to SpellCheckCollator to issue test
queries against the individual words instead of the collations.


Of course if you're using Lucene directly and not Solr, then you would want to build a series
of queries that each query one word with the filters applied.  DirectSpellChecker#suggestSimilar
returns an array of SuggestWord instances that contain the individual words you would want
to try.  To optimize this, you can use the same approach as in SOLR-3240, implementing a Collector
that only looks for 1 document then quits.

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

-----Original Message-----
From: Nalini Kartha [] 
Sent: Thursday, December 27, 2012 2:31 PM
Subject: Re: Converting fq params to Filter object

Hi James,

Yup, that was what I tried to do initially but it seems like calling
through to those Solr methods from DirectSpellChecker was not a good idea -
am I wrong? And like you mentioned, this seemed like it wasn't low-level

Eric: Unfortunately the collate functionality does not work for our use
case since the queries we're correcting are default OR. Here's the original
thread about this -


On Thu, Dec 27, 2012 at 2:46 PM, Dyer, James


View raw message