lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dyer, James" <>
Subject RE: fuzzy terms, DirectSolrSpellChecker and alternativeTermCount
Date Mon, 22 Sep 2014 14:08:56 GMT

Can you show us all of the parameters you are sending to the spellchecker?  When you specify
"alternativeTermCount" with "spellcheck.q=quidam", what are the terms you expect to get back?
 Also, are you getting any query results back?  If you are using a "q" that returns results,
or more results than you specify for "spellcheck.maxResultsForSuggest", spellcheck won't give
you anything regardless of what you put for "spellcheck.q".

James Dyer
Ingram Content Group
(615) 213-4311

-----Original Message-----
From: Nathaniel Rudavsky-Brody [] 
Sent: Monday, September 22, 2014 8:08 AM
Subject: fuzzy terms, DirectSolrSpellChecker and alternativeTermCount


I'm trying find the best way to "fake" the terms component for fuzzy 
queries. That is, I need the full set of index terms for each of the 
two queries "quidam~1" and "quidam~2".

I tried defining two suggesters with FuzzyLookupFactory, with 
maxEdits=1 and 2 respectively, but the results for "quidam~1" include 
suffixes like "quodammodo", which makes sense for a suggester but isn't 
what I want here.

Now I'm trying with the spell-checker. As far as I can see, 
IndexBasedSpellChecker doesn't let me set maxEdits, so I can't use it 
to distinguish between my two queries. DirectSolrSpellChecker seems 
like it should work, ie:

  <searchComponent name="fuzzyterms" class="solr.SpellCheckComponent">
    <lst name="spellchecker">
      <str name="name">fuzzy1</str>
      <str name="classname">solr.DirectSolrSpellChecker</str>
         <int name="maxEdits">1</int>
    <lst name="spellchecker">
      <str name="name">fuzzy2</str>
      <str name="classname">solr.DirectSolrSpellChecker</str>
         <int name="maxEdits">2</int>

However the parameter spellcheck.alternativeTermCount has no effect, so 
the query "spellcheck.q=quidam" gives no results, but 
"spellcheck.q=quiam" (which doesn't exist in the index) gives the 
expected terms.

Am I missing something? Or is there a better way to do this?

Many thanks for any help and ideas,

View raw message