K
K
Kolya Vantukh2019-01-09 19:48:44
elasticsearch
Kolya Vantukh, 2019-01-09 19:48:44

How to properly configure elasticsearch for fuzzy search?

There are product names, for example
-Exo Wave i007plus
-Archos 70 Copper
-Exo Wave i007a
-Cavion Base 7.1 Quad
-Exo Wave versioni007b
You need to make an inaccurate search for them according to this principle:
- when entering i007a, the results included Exo Wave i007a, Exo Wave i007plus and Exo Wave versioni007b .
in an inaccurate search in the documentation, I only found a fuzzy search using the Levenshtein algorithm, but this, in my opinion, is not what you need. Because there the maximum distance can be 2 characters, and in my case most cases will not fall under this restriction (at least i007a (Exo Wave versioni007b))
You need something like LIKE% word% but with the possibility of an error in the word, but how to implement it I can't find it at all.
What can you advise on this task? Where to dig further?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2019-01-09
@vkolya

Fuzzy will not help here, you need to break words with numbers into separate terms -
i007a -> i 007 a
versioni007plus -> versioni 007 plus
Etc.
This can be done through regexp character filter with a regular expression, and added to a separate additional field. Search to do on several fields at once.
You can also try char group tokenizer or pattern tokenizer with a regular expression that hits text and numbers separately

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question