W
W
WebDev2016-10-11 16:12:07
elasticsearch
WebDev, 2016-10-11 16:12:07

How to sort results in elasticsearch?

When searching elasticsearch for the value "turmion", I get the following results:
1) Turmoil
2) Trion
3) Turin Brakes
4) Torsion
5) Viktor Hurmio & Fetknopparna
6) Tuomari Nurmio
7) Turmion Kätilöt
8) Grégory Turpin
That is, the word, fully matching the request only in 8th place. It is clear that if you take the query string and records from the storage and compare them in their entirety, then the first row of the result is more similar than the eighth. But it would be more logical to put the eighth in the first place.
This result is given by elastic with the parameter fuzzinness = 'AUTO'.
Is there any way to sort the results by the presence of a word while still retaining fuzziness?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question