lucene - solr search with keywords having space not giving proper results -
i have list of keywords few of them below
cheap hotels dubai hotel extended hotel .... ..
i have store(storename:hotelsstore) , added keywords above(which have white space) store , doing solr indexing. if search "cheap hotels" store:hotelsstore not showing reults.
but if add "cheaphotels" without space , indexing. if search "cheaphotels" desired store(hotelsstore) showing in results.
note: using lucene 5.4 , solr 5.4.
please me on this.
thanks, syamala.
try generate word parts using worddelimiterfilter filter on storename field.
you customise filter how want.
just example:
one way of doing specify generatewordparts="1" catenatewords="1" in analyzer used indexing, , generatewordparts="1" in analyzer used querying. given current standardtokenizer removes many intra-word delimiters, recommended filter used after tokenizer leaves them in place (such whitespacetokenizer).
<tokenizer class="solr.whitespacetokenizerfactory"/> <filter class="solr.worddelimiterfilterfactory" generatewordparts="1" generatenumberparts="1" catenatewords="1" catenatenumbers="1" catenateall="0" preserveoriginal="1" />
generate_word_parts set 1
causes parts of words generated: "hotelsstore" => "hotel" "store"
Comments
Post a Comment