‎2019 Sep 12 5:53 PM - edited ‎2024 Feb 04 7:10 AM
if Customer Part # is 48-32-4024, then the user will be search both ways "48-32-4024" or as "48324024"
Request clarification before answering.
Hi Mahendher,
In solr schema.xml, use WordDelimiterFilterFactory for the corresponding field type.
Example: Below snippet is a good starting point.
<analyzer type="index">
..
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" catenateNumbers="1"/>
...
</analyzer>
<analyzer type="query">
...
<filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" catenateNumbers="0" />
...
</analyzer>
'catenateNumbers' is the one that does the trick for you.
From solr documentation -
catenateNumbers - (integer, default 0) If non-zero, maximal runs of number parts will be joined: 1947-32" ? "194732"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.