I have this ES query:
{
"query": {
"bool": {
"should": [
{
"multi_match": {
"query": "test",
"fields": [
"name^-1.0",
"id^-1.0",
"address.city^-1.0",
"address.street^-1.0"
],
"type": "phrase_prefix",
"lenient": "true"
}
}
],
"boost": 1.0,
"minimum_should_match": "1"
}
},
"from": 0,
"size": 20
}
and currently what happens is, when I search for person with the name john
, I will get bunch of results that the id, address.city, address.street
contains john in them, which is fine, but I want name
to be more important, and also if I have in the es 2 people john
and someone with 2 names like george john
I would want the just john
to come up first.
can I do that? :)