Jesse
Jesse

Reputation: 3

Make an exception WordDelimiterFilterFactory

I deleted WDFF because I don't want numbers to be separated from words. So, query 123ABC456 should match only documents with 123abc456 in it. Only exception I want is with the hyphen-minus (-) symbol. Query Wi-Fi should also match wifi.

<filter catenateAll="0" 
        catenateNumbers="1"
        catenateWords="1" 
        class="solr.WordDelimiterFilterFactory"
        generateNumberParts="1" 
        generateWordParts="0"
        preserveOriginal="1" 
        splitOnCaseChange="0"
        splitOnNumerics="1" 
        types="wdfftypes.txt"/>

Any ideas how to accomplish this?

Upvotes: 0

Views: 74

Answers (1)

root
root

Reputation: 3957

You can disable the alpahnumeric splitting by setting the following

splitOnNumerics="0"

Now if you want for Wi-Fi to match WiFi then use the following property

catenateWords=1

which I think you are already using.

You can read more about the options here https://cwiki.apache.org/confluence/display/solr/Filter+Descriptions#FilterDescriptions-WordDelimiterFilter

Upvotes: 1

Related Questions