schema - Solr issue with escaping special characters -
i having issues special characters in search term sent solr through query. when search part number 123-45, should 2 results i.e., 123-45 , 12345. please let me know how can , configuration need use in schema.xml thanks
if that's character want remove, use patternreplacefilterfactory replace "-" "" when you're indexing , querying:
<analyzer> <tokenizer class="solr.keywordtokenizerfactory"/> <filter class="solr.patternreplacefilterfactory" pattern="-" replacement="" /> </analyzer>
the keywordtokenizer keep whole term separate token, , patternreplacefilterfactory remove -
, replace nothing, meaning both indexed , queried term normalized 12345
.
Comments
Post a Comment