Hey
I have four terms, Term_A, Term_B, Term_C and Term_D.
I would like to do something like this:
{
"query": {
"bool" : {
"should" : [
{ "term" : { "tags_field" : "Term_A" } },
{ "term" : { "tags_field" : "Term_B" } },
{ "term" : { "tags_field" : "Term_C" } },
{ "term" : { "tags_field" : "Term_D" } }
],
"minimum_should_match" : 1,
"boost" : 1.0,
"score_mode": max
}
}
}
Where the score_mode part should say, that I only want the document to get the score of the best matching term.
I am aware of multi-field search, but that is one queryString to multiple fields.
What I wish here is multiple queryStrings, and only get score from the best matching.
Appreciate all the help I can get
(We are using elastic 1.7, but if there is a simple solution I havn't thought about, it will probably work on this old version as well )
/Jens