Hi Rajesh,
                What configuration had you set in your schema.xml?

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