lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Nagy <andrew.n...@villanova.edu>
Subject RE: Multiple search components in one handler - ie spellchecker
Date Fri, 25 Jul 2008 18:44:39 GMT
Thanks for getting back to me Geoff.  Although, that is pretty much what I have.  Maybe if
I show my solrconfig someone might be able to point out what I have incorrect?  The problem
is that nothing related to the spelling options are show in the results, just the normal expected
search results.  Here is my query:
http://localhost:8080/solr/select?q=*:*&rows=1&spellcheck=true&spellcheck.q=scandanava&spellcheck.build=true

    <searchComponent name="spellcheck" class="org.apache.solr.handler.component.SpellCheckComponent">
      <lst name="spellchecker">
        <str name="field">allfields</str>
        <str name="accuracy">0.7</str> <!-- 0.5 is the default setting -->
        <str name="spellcheckIndexDir">./spellchecker</str>
      </lst>
      <str name="queryAnalyzerFieldType">text</str>
    </searchComponent>
    <queryConverter name="queryConverter" class="org.apache.solr.spelling.SpellingQueryConverter"/>
    <requestHandler name="/search" class="org.apache.solr.handler.component.SearchHandler">
      <lst name="defaults">
        <str name="echoParams">explicit</str>
      </lst>
      <arr name="last-components">
        <str>spellcheck</str>
        <!--<str>elevator</str>-->
      </arr>
    </requestHandler>

________________________________________
From: Geoffrey Young [geoff@modperlcookbook.org]
Sent: Friday, July 25, 2008 2:13 PM
To: solr-user@lucene.apache.org
Subject: Re: Multiple search components in one handler - ie spellchecker

Andrew Nagy wrote:
> Hello - I am attempting to add the spellCheck component in my
> "search" requesthandler so when a users does a search, they get the
> results and spelling corrections all in one query just like the way
> the facets work.
>
> I am having some trouble accomplishing this - can anyone point me to
> documentation (other than
> http://wiki.apache.org/solr/SpellCheckComponent) on how to do this or
> an example solrconfig that would do this correctly?

http://mail-archives.apache.org/mod_mbox/lucene-solr-user/200806.mbox/%3C44705.76.117.81.167.1214515546.squirrel@www.modperlcookbook.org%3E

in general, just add the

   <arr name="last-components">
     <str>spellcheck</str>
   </arr>

bit to your existing handler after following setup in the twiki docs.

you can ignore the part about the exceptions, as that has been fixed in
trunk.

HTH

--Geoff

Mime
View raw message