Hey James Dyer,
                             Sorry for late responding because I went out
for couple of days. I have tried out the Rajesh Hazari's configuration
which he pasted inside the mail. It seems to be working. I feel that It is
working because by reducing the *<str name="spellcheck.count">25</str> *to*
<str name="spellcheck.count">5</str>* by which collations come less and
spellcheck.maxCollationTries is able to identify or evaluate the collation
"gone with the wind".
But here, the problem is that, hits of "gone with the wind" are coming
less(only 53) *{Look collations.png}* while there are 394 hits for "gone
with the wind", if I tried the correct phrase in param q="gone with the
wind". I got 394 - numFound in response.*{Look response.png}*
Any Idea of it?


On Fri, Feb 13, 2015 at 11:31 PM, Dyer, James <james.d...@ingramcontent.com>
wrote:

> Nitin,
>
> Can you post the full spellcheck response when you query:
>
> q=gram_ci:"gone wthh thes wint"&wt=json&indent=true&shards.qt=/spell
>
> James Dyer
> Ingram Content Group
>
>
> -----Original Message-----
> From: Nitin Solanki [mailto:nitinml...@gmail.com]
> Sent: Friday, February 13, 2015 1:05 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Collations are not working fine.
>
> Hi James Dyer,
>                           I did the same as you told me. Used
> WordBreakSolrSpellChecker instead of shingles. But still collations are not
> coming or working.
> For instance, I tried to get collation of "gone with the wind" by searching
> "gone wthh thes wint" on field=gram_ci but didn't succeed. Even, I am
> getting the suggestions of wtth as *with*, thes as *the*, wint as *wind*.
> Also I have documents which contains "gone with the wind" having 167 times
> in the documents. I don't know that I am missing something or not.
> Please check my below solr configuration:
>
> *URL: *localhost:8983/solr/wikingram/spell?q=gram_ci:"gone wthh thes
> wint"&wt=json&indent=true&shards.qt=/spell
>
> *solrconfig.xml:*
>
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>     <str name="queryAnalyzerFieldType">textSpellCi</str>
>     <lst name="spellchecker">
>       <str name="name">default</str>
>       <str name="field">gram_ci</str>
>       <str name="classname">solr.DirectSolrSpellChecker</str>
>       <str name="distanceMeasure">internal</str>
>       <float name="accuracy">0.5</float>
>       <int name="maxEdits">2</int>
>       <int name="minPrefix">0</int>
>       <int name="maxInspections">5</int>
>       <int name="minQueryLength">2</int>
>       <float name="maxQueryFrequency">0.9</float>
>       <str name="comparatorClass">freq</str>
>     </lst>
> <lst name="spellchecker">
>       <str name="name">wordbreak</str>
>       <str name="classname">solr.WordBreakSolrSpellChecker</str>
>       <str name="field">gram</str>
>       <str name="combineWords">true</str>
>       <str name="breakWords">true</str>
>       <int name="maxChanges">5</int>
>     </lst>
> </searchComponent>
>
> <requestHandler name="/spell" class="solr.SearchHandler" startup="lazy">
>     <lst name="defaults">
>       <str name="df">gram_ci</str>
>       <str name="spellcheck.dictionary">default</str>
>       <str name="spellcheck">on</str>
>       <str name="spellcheck.extendedResults">true</str>
>       <str name="spellcheck.count">25</str>
>       <str name="spellcheck.onlyMorePopular">true</str>
>       <str name="spellcheck.maxResultsForSuggest">100000000</str>
>       <str name="spellcheck.alternativeTermCount">25</str>
>       <str name="spellcheck.collate">true</str>
>       <str name="spellcheck.maxCollations">50</str>
>       <str name="spellcheck.maxCollationTries">50</str>
>       <str name="spellcheck.collateExtendedResults">true</str>
>     </lst>
>     <arr name="last-components">
>       <str>spellcheck</str>
>     </arr>
>   </requestHandler>
>
> *Schema.xml: *
>
> <field name="gram_ci" type="textSpellCi" indexed="true" stored="true"
> multiValued="false"/>
>
> </fieldType><fieldType name="textSpellCi" class="solr.TextField"
> positionIncrementGap="100">
>        <analyzer type="index">
>         <tokenizer class="solr.StandardTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
>     <analyzer type="query">
>         <tokenizer class="solr.StandardTokenizerFactory"/>
>         <filter class="solr.LowerCaseFilterFactory"/>
> </analyzer>
> </fieldType>
>

Reply via email to