How to Prioritize multi match result by field names


(Matej Noga) #1

Hi, I have a problem with prioritize results from multi match query by fields name.
I’m using this query :
{
"query": {
"multi_match": {
"query": "some_string",
"fields": [ "_all" ]
}
}
}
I have a lots of different fields in multiple indexes and types, and I need to prioritize/sort results by field names in which query string was found. For example, if query return multiple items, I need items where “some_string” was found in field with name “most_important_field” first, because this result is much more important that others with some else fields. Therefor I need specify a few field names that have to have better score.
I’m using ElasticSearch version 1.6 (mainly in Java API).
Thanks.


(system) #2