Threshold frequency is not working in spell check in Solr -
i stuck in middle of solr. need most popular words w.r.t query. have used phonetic filter on both index , query here problem is giving too many terms. need few terms specific query.
schema.xml
<fieldtype name="textspell" class="solr.textfield" positionincrementgap="100"> <analyzer type="index"> <filter class="solr.trimfilterfactory"/> <filter class="solr.lowercasefilterfactory"/> <tokenizer class="solr.keywordtokenizerfactory"/> <filter class="solr.phoneticfilterfactory" encoder="doublemetaphone" inject="true"/> <filter class="solr.removeduplicatestokenfilterfactory"/> </analyzer> <analyzer type="query"> <filter class="solr.trimfilterfactory"/> <tokenizer class="solr.keywordtokenizerfactory"/> <filter class="solr.lowercasefilterfactory"/> <filter class="solr.phoneticfilterfactory" encoder="doublemetaphone" inject="true"/> </analyzer> </fieldtype>
solrconfig.xml
<lst name="spellchecker"> <str name="name">default</str> <str name="field">term</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">1</int> <int name="maxinspections">5</int> <int name="minquerylength">4</int> <float name="maxqueryfrequency">0.90</float> <float name="thresholdtokenfrequency">0.90</float> </lst> <requesthandler name="/spell" class="solr.searchhandler" startup="lazy"> <lst name="defaults"> <str name="df">term</str> <str name="spellcheck.dictionary">default</str> <str name="spellcheck">on</str> <str name="spellcheck.extendedresults">true</str> <str name="spellcheck.count">10</str> <str name="spellcheck.alternativetermcount">10</str> <str name="spellcheck.maxresultsforsuggest">10</str> <str name="spellcheck.collate">true</str> <str name="spellcheck.collateextendedresults">true</str> <str name="spellcheck.maxcollationtries">10</str> <str name="spellcheck.maxcollations">5</str> <str name="spellcheck.onlymorepopular">true</str> </lst> <arr name="last-components"> <str>spellcheck</str> </arr> </requesthandler>
i using thresholdtokenfrequency not working have tried varying value of threshold between 0 , 1. gives same result. ?
Comments
Post a Comment