I am using elasticsearch 1.1.2.
I am using multimatch query with different weights on the searchable fields.
Example:
{ "multi_match" : { "query" : "this is a test", "fields" : [ "title^3", "description^2", "body" ] } }
So here in my example title is three times as important as the body.
I would like to customize the weight given for each field depending on the match found.
Let's say I search for "injury", I want to:
-Give the title a coefficient of 3 if an exact match is found: title contains the word "injury".
-Give the title a coefficient of 2 if a synonym is found: title contains the word "bruise".
-Give the title a coefficient of 1 if a stemming is found : title contains the word "injuries".
Is there a way to do this kind of customization ?
Thanks!