Assuming I have a document with three fields: name
, company
, email
each one mapped with edge-ngram
{
"name": "John",
"company": "John's company",
"email": "johndoe@gmail.com"
}
When searching for "john" I want to be able to get each field score individually
{
"query": {
"bool": {
"should": [
{ "match": { "name": "john" }},
{ "match": { "company": "john" }},
{ "match": { "email": "john" }}
]
}
}
}
In this example the score from each match
clause is added together, then divided by the number of match
clauses. So is there anyway to obtain the score from each match
clause individually not just the final score for the whole document?
I think setting "explain": true is also not ideal since it provides very low-level details of scoring (inefficient and difficult to parse).