You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "balaji.a" <re...@gmail.com> on 2009/10/07 10:44:02 UTC
Doing SpellCheck in distributed search
Hi All,
I am trying to get spell check suggestions in my distributed search query
using shards. I have 2 cores configured core0 and core1 both having spell
check component configured. On requesting search result using the following
query I don't get the spelling suggestions.
http://localhost:8080/solr/core0/select?spellcheck=true&q=BrekFast&shards=localhost:8080/solr/core0,localhost:8080/solr/core1
But I could able to get suggestions when i query single core using the url
given below
http://localhost:8080/solr/core0/select?spellcheck=true&q=BrekFast
On debugging the code (Solr 1.3) I can see suggestions coming from core0,
but while merging the result the suggestion value is getting lost. I am not
sure is it a bug in the code or its an enhancement to future release. Could
anyone guide me on how to acheive spellcheck over multiple cores?
Thanks!
--
View this message in context: http://www.nabble.com/Doing-SpellCheck-in-distributed-search-tp25782755p25782755.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Doing SpellCheck in distributed search
Posted by "balaji.a" <re...@gmail.com>.
Sorry! it was my mistake of not copying the war at correct location.
balaji.a wrote:
>
> Thanks Shalin! I applied your patch and deployed the war. While debugging
> the overridden method SpellCheckComponent.finishStage is not getting
> invoked by the SearchHandler. Instead its invoking the
> SearchComponent.finishStage method. Do I need to configure anything extra
> to make it work? My current configuration is as follows:
>
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>
> <str name="queryAnalyzerFieldType">textSpell</str>
>
> <lst name="spellchecker">
> <str name="name">default</str>
> <str name="field">spell</str>
> <str name="spellcheckIndexDir">./spellchecker1</str>
>
> </lst>
> <lst name="spellchecker">
> <str name="name">jarowinkler</str>
> <str name="field">spell</str>
> <!-- Use a different Distance Measure -->
> <str
> name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
> <str name="spellcheckIndexDir">./spellchecker2</str>
>
> </lst>
> </searchComponent>
>
> <requestHandler name="standard" class="solr.SearchHandler"
> default="true">
> <!-- default values for query parameters -->
> <lst name="defaults">
> <str name="echoParams">explicit</str>
> <!--
> <int name="rows">10</int>
> <str name="fl">*</str>
> <str name="version">2.1</str>
> -->
> <!-- omp = Only More Popular -->
> <str name="spellcheck.onlyMorePopular">false</str>
> <!-- exr = Extended Results -->
> <str name="spellcheck.extendedResults">false</str>
> <!-- The number of suggestions to return -->
> <str name="spellcheck.count">1</str>
> </lst>
> <arr name="last-components">
> <str>spellcheck</str>
> </arr>
> </requestHandler>
>
>
>
> Shalin Shekhar Mangar wrote:
>>
>> On Wed, Oct 7, 2009 at 2:14 PM, balaji.a <re...@gmail.com> wrote:
>>
>>>
>>> Hi All,
>>> I am trying to get spell check suggestions in my distributed search
>>> query
>>> using shards.
>>
>>
>> SpellCheckComponent does not support distributed search yet. There is an
>> issue open with a patch. If you decide to use, do let us know your
>> feedback:
>>
>> https://issues.apache.org/jira/browse/SOLR-785
>>
>> --
>> Regards,
>> Shalin Shekhar Mangar.
>>
>>
>
>
--
View this message in context: http://www.nabble.com/Doing-SpellCheck-in-distributed-search-tp25782755p25783922.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Doing SpellCheck in distributed search
Posted by "balaji.a" <re...@gmail.com>.
Thanks Shalin! I applied your patch and deployed the war. While debugging the
overridden method SpellCheckComponent.finishStage is not getting invoked by
the SearchHandler. Instead its invoking the SearchComponent.finishStage
method. Do I need to configure anything extra to make it work? My current
configuration is as follows:
<searchComponent name="spellcheck" class="solr.SpellCheckComponent">
<str name="queryAnalyzerFieldType">textSpell</str>
<lst name="spellchecker">
<str name="name">default</str>
<str name="field">spell</str>
<str name="spellcheckIndexDir">./spellchecker1</str>
</lst>
<lst name="spellchecker">
<str name="name">jarowinkler</str>
<str name="field">spell</str>
<!-- Use a different Distance Measure -->
<str
name="distanceMeasure">org.apache.lucene.search.spell.JaroWinklerDistance</str>
<str name="spellcheckIndexDir">./spellchecker2</str>
</lst>
</searchComponent>
<requestHandler name="standard" class="solr.SearchHandler" default="true">
<!-- default values for query parameters -->
<lst name="defaults">
<str name="echoParams">explicit</str>
<!--
<int name="rows">10</int>
<str name="fl">*</str>
<str name="version">2.1</str>
-->
<!-- omp = Only More Popular -->
<str name="spellcheck.onlyMorePopular">false</str>
<!-- exr = Extended Results -->
<str name="spellcheck.extendedResults">false</str>
<!-- The number of suggestions to return -->
<str name="spellcheck.count">1</str>
</lst>
<arr name="last-components">
<str>spellcheck</str>
</arr>
</requestHandler>
Shalin Shekhar Mangar wrote:
>
> On Wed, Oct 7, 2009 at 2:14 PM, balaji.a <re...@gmail.com> wrote:
>
>>
>> Hi All,
>> I am trying to get spell check suggestions in my distributed search
>> query
>> using shards.
>
>
> SpellCheckComponent does not support distributed search yet. There is an
> issue open with a patch. If you decide to use, do let us know your
> feedback:
>
> https://issues.apache.org/jira/browse/SOLR-785
>
> --
> Regards,
> Shalin Shekhar Mangar.
>
>
--
View this message in context: http://www.nabble.com/Doing-SpellCheck-in-distributed-search-tp25782755p25783896.html
Sent from the Solr - User mailing list archive at Nabble.com.
Re: Doing SpellCheck in distributed search
Posted by Shalin Shekhar Mangar <sh...@gmail.com>.
On Wed, Oct 7, 2009 at 2:14 PM, balaji.a <re...@gmail.com> wrote:
>
> Hi All,
> I am trying to get spell check suggestions in my distributed search query
> using shards.
SpellCheckComponent does not support distributed search yet. There is an
issue open with a patch. If you decide to use, do let us know your feedback:
https://issues.apache.org/jira/browse/SOLR-785
--
Regards,
Shalin Shekhar Mangar.