Hey Rajesh,
                             Sorry for late responding because I went out
for couple of days. I have tried out the configuration which you sent me.
Thanks a lot. 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?

One more thing to say: You used
<str name="spellcheck.collateParam.mm">100%</str>
<str name="spellcheck.collateParam.q.op">AND</str>
But It doesn't seems to be working. I tried by removing above 2 lines, it
doesn't affect the result. I also changed the value of
spellcheck.collateParam.mm to 0% and spellcheck.collateParam.q.op to "OR".
Even it doesn't affect on the results. I am unable to understand what is
spellcheck.collateParam.mm and spellcheck.collateParam.q.op after googling.
Will you please assist me?
Thanks .



On Sat, Feb 14, 2015 at 2:18 AM, Rajesh Hazari <rajeshhaz...@gmail.com>
wrote:

> Hi Nitin,
>
> Can u try with the below config, we have these config seems to be working
> for us.
>
> <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
>
>      <str name="queryAnalyzerFieldType">text_general</str>
>
>
>   <lst name="spellchecker">
> <str name="name">wordbreak</str>
> <str name="classname">solr.WordBreakSolrSpellChecker</str>
> <str name="field">textSpell</str>
> <str name="combineWords">true</str>
> <str name="breakWords">false</str>
> <int name="maxChanges">5</int>
>   </lst>
>
>    <lst name="spellchecker">
> <str name="name">default</str>
> <str name="field">textSpell</str>
> <str name="classname">solr.IndexBasedSpellChecker</str>
> <str name="spellcheckIndexDir">./spellchecker</str>
> <str name="accuracy">0.75</str>
> <float name="thresholdTokenFrequency">0.01</float>
> <str name="buildOnCommit">true</str>
> <str name="spellcheck.maxResultsForSuggest">5</str>
>      </lst>
>
>
>   </searchComponent>
>
>
>
> <str name="spellcheck">true</str>
> <str name="spellcheck.dictionary">default</str>
> <str name="spellcheck.dictionary">wordbreak</str>
> <int name="spellcheck.count">5</int>
> <str name="spellcheck.alternativeTermCount">15</str>
> <str name="spellcheck.collate">true</str>
> <str name="spellcheck.onlyMorePopular">false</str>
> <str name="spellcheck.extendedResults">true</str>
> <str name ="spellcheck.maxCollations">100</str>
> <str name="spellcheck.collateParam.mm">100%</str>
> <str name="spellcheck.collateParam.q.op">AND</str>
> <str name="spellcheck.maxCollationTries">1000</str>
>
>
> *Rajesh.*
>
> On Fri, Feb 13, 2015 at 1:01 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