lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tristan Vittorio" <tristan.vitto...@gmail.com>
Subject Re: Spell Check Handler
Date Fri, 06 Jul 2007 23:51:15 GMT
I couldn't find any documention on the spell check handler either but found
enough information from the solrconfig.xml file, simply search for
"SpellCheckerRequestHandler" (online version here):
http://svn.apache.org/repos/asf/lucene/solr/trunk/example/solr/conf/solrconfig.xml

You can view the original development discussion from JIRA (not sure how
helpful that will be for you though):
https://issues.apache.org/jira/browse/SOLR-81

In a nutshell, the configuration parameters available are::

suggestionCount: determines how many spelling suggestions are returned.
accuracy: a float value between 1.0 and 0.0 on how close the suggested words
should match the original word being checked.
spellcheckerIndexDir and  termSourceField: check solrconfig.xml for a full
explanation.

In order to use the spell checking hander for the first time, you need to
explicitly build the spelling index with a sample query something like this:

http://localhost:8080/solr/select/?q=macrosoft&qt=spellchecker&cmd=rebuild
<http://localhost:8080/solr/select/?q=macrosoft&qt=spellchecker>
Depending on how large you main index is, this rebuild operation could take
a while.  Subsequent queries can omit '&cmd=rebuild' and will return results
much faster:

http://localhost:8080/solr/select/?q=macrosoft&qt=spellchecker
 <http://localhost:8080/solr/select/?q=macrosoft&qt=spellchecker>
The order of the suggestions returned seems to be based on the accuracy
figure (i.e. how close it matches the original word). it would be great to
be able to sort these suggested results based on term frequency / document
frequency of the suggested word in the main index, since the most accurate
suggestion may not always be the most relevant.

As far as I can tell there is currently no way of doing this using the
spellchecker handler alone (you could always run seperate standard queries
on each word suggestion and order by numDocs, but that would be very
inefficient), has anybody else tried to achieve this?

cheers,
Tristan



On 7/7/07, Andrew Nagy <andrew.nagy@villanova.edu > wrote:
>
> Hello, is there any documentation on how to use the new spell check
> module?
>
> Thanks
> Andrew
>

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