lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathaniel Rudavsky-Brody <nathaniel.rudav...@gmail.com>
Subject fuzzy terms, DirectSolrSpellChecker and alternativeTermCount
Date Mon, 22 Sep 2014 13:07:45 GMT
Hello,

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>
    <lst name="spellchecker">
      <str name="name">fuzzy2</str>
      <str name="classname">solr.DirectSolrSpellChecker</str>
         <int name="maxEdits">2</int>
    ...
    </lst>
  </searchComponent>

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,

Nathaniel

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message