lucene - Removing unwanted items from solr autosuggester -


i trying implement auto suggest huge set of paragraphs indexed. want filter out unwanted words appearing in auto suggest. example words "and", "how", "when", etc needs avoided. how go it.

this configuration have done autosuggest in solrconfig.xml..

<requesthandler class="org.apache.solr.handler.component.searchhandler" name="/suggest">     <lst name="defaults">       <str name="spellcheck">true</str>       <str name="spellcheck.dictionary">suggest</str>       <str name="spellcheck.onlymorepopular">true</str>       <str name="spellcheck.count">5</str>       <str name="spellcheck.collate">true</str>     </lst>     <arr name="components">       <str>suggest</str>     </arr>   </requesthandler>   <searchcomponent class="solr.spellcheckcomponent" name="suggest"> <lst name="spellchecker">   <str name="name">suggest</str>   <str name="classname">org.apache.solr.spelling.suggest.suggester</str>   <str name="lookupimpl">org.apache.solr.spelling.suggest.tst.tstlookup</str>    <str name="field">keywords</str>    <float name="threshold">0.005</float>   <str name="buildoncommit">true</str>  </lst> 

i recommend adding stopfilterfactory backing fieldtype definition keywords field in schema.xml file. if need words ("and", "how", "when") in keywords field other searching requirements, suggest creating custom field in schema.xml suggester , can use copyfield directive populate new field.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -