How to configure Lucene so that I can look for ignoring whitespace?

For example, a list of part numbers includes:

JRB-1000
JRB 1000
JRB1000
JRB100-0
-JRB1000

If the user is looking for "JRB1000" or "JRB 1000", I would like to return a match for all part numbers above.

+3
source share
1 answer

Analyzer, (JRB, 1000; ) (JRB1000, , ). Analyzer tokenStream , , TokenFilter.

Analyzer .

( Java-, .NET .)

+2

Source: https://habr.com/ru/post/1769175/