A
A
Arseniy2016-04-19 07:30:36
elasticsearch
Arseniy, 2016-04-19 07:30:36

Is it possible to prioritize exact matches during full-text search?

Suppose there is a field on which the ngram analyzer is set. For example, there are 3 documents where this field accepts sl. values:
Zelenogradskaya 13
Zelenogradskaya 13/1
Zelenogradskaya 13/3
How, when entering Zelenogradskaya 13, to force elastic to give priority to an exact match? He just thinks that the two entries below are more relevant.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexey, 2016-04-19
@al_mak

Here, try to read here:
https://www.elastic.co/guide/en/elasticsearch/guid...
Pay attention to the boost key.

N
Narek, 2016-04-19
@webtop

ES "drops" the "/" character by default.
I did similar - address search in ES. But I still haven't figured out how to overcome it.

X
xmoonlight, 2016-07-02
@xmoonlight

See demo here
159f3590a8664c41a4e6008c09ec47ec.jpg

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question