Solr spell check mutliwords -
could not figure out actual reason why configured solr spell checker not giving desire output. in indexed data query: symphony+mobile has around 3.5k+ docs , spell checker detect correctly spelled. when miss-spell "symphony" in query: symphony+mobile showing results "mobile" , spell checker detect query correctly spelled. have searched query in different combination. please find search result stat
query: symphony
**resultfound**: 1190 **spellchecker**: correctly spelled
query: mobile
**resultfound**: 2850 **spellchecker**: correctly spelled
query: simphony
**resultfound**: 0 **spellchecker**: symphony **collation hits**: 1190
query: symphony+mobile
**resultfound**: 3585 **spellchecker**: correctly spelled
query: simphony+mobile
**resultfound**: 2850 **spellchecker**: correctly spelled
query: symphony+mbile
**resultfound**: 1190 **spellchecker**: correctly spelled
in last 2 queries should suggest miss-spelled word "simphony" , "mbile"
please find configuration below. spell check configuration shown.
solrconfig.xml
:
<requesthandler name="/select" class="solr.searchhandler"> <lst name="defaults"> <str name="echoparams">explicit</str> <int name="rows">10</int> <str name="df">product_name</str> <str name="spellcheck">on</str> <str name="spellcheck.dictionary">default</str> <str name="spellcheck.dictionary">wordbreak</str> <str name="spellcheck.extendedresults">true</str> <str name="spellcheck.count">5</str> <str name="spellcheck.alternativetermcount">2</str> <str name="spellcheck.maxresultsforsuggest">5</str> <str name="spellcheck.collate">true</str> <str name="spellcheck.collateextendedresults">true</str> <str name="spellcheck.maxcollationtries">5</str> <str name="spellcheck.maxcollations">3</str> </lst> <arr name="last-components"> <str>spellcheck</str> </arr> </requesthandler> <searchcomponent name="spellcheck" class="solr.spellcheckcomponent"> <str name="queryanalyzerfieldtype">text_suggest</str> <lst name="spellchecker"> <str name="name">default</str> <str name="field">suggest</str> <str name="classname">solr.directsolrspellchecker</str> <str name="distancemeasure">internal</str> <float name="accuracy">0.5</float> </lst> <lst name="spellchecker"> <str name="name">wordbreak</str> <str name="field">suggest</str> <str name="classname">solr.wordbreaksolrspellchecker</str> <str name="combinewords">true</str> <str name="breakwords">true</str> <int name="maxchanges">10</int> <int name="minbreaklength">5</int> </lst> </searchcomponent>
schema.xml
:
<fieldtype name="text_suggest" class="solr.textfield" positionincrementgap="100"> <analyzer> <tokenizer class="solr.uax29urlemailtokenizerfactory"/> <filter class="solr.stopfilterfactory" ignorecase="true" words="stopwords.txt"/> <filter class="solr.lowercasefilterfactory"/> <filter class="solr.asciifoldingfilterfactory"/> <filter class="solr.englishpossessivefilterfactory"/> </analyzer> </fieldtype>
solved :) found actual reason of problem. set "maxresultsforsuggest" 5 thats why it's not showing suggestion because each word in query has more search results 5
Comments
Post a Comment