Want a fault tolerant search but got to much results


I am trying to set up an error-tolerant search and have created the field "name" as "text" in my index and would like to search for it.

I expect to search for exactly what I entered but normalise the string before.

I have found an example online of how I would like it.


Here I searched for "Strick Strick Hurra Die Küstenwolle" and got results like "RAILTRAILER STRICK" or just "STRICK".

The website linked above also has the corresponding words in its database. I have created them exactly like this in my system for testing purposes.

My query is as follows:

GET /myindex/_search/
  "query": {
    "match": {
      "name": { "Strick Strick Hurra Die Küstenwolle" }

How do I manage to search error-tolerantly but delete matches that are much shorter and hardly have a match?

I have tried to filter by the score, but it is sometimes very high when there is hardly any match.

I would be very pleased to receive help!

Thank you!

by default this is an OR combined query, meaning a single term is required match.

Take a look at minimum should match and at the ability to use should clause in a bool query to boost a complete match.

hope this helps!

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.