I would like to know if it is possible to implement this in elastic. Let's say I have documents of this structure.
{
"title": "text1 text2 text3",
"score_adj":[
{"text":"text1", "adj": -2},
{"text":"text3", "adj": -4}
]
}
And I will look for documents where the title
contains the word text1
, I will find this document, and also, since this word is in score_adj
and it has -2
, I will decrease the final score by this number. Is it possible to implement such logic? I know that there is script_score
that allows you to change the score, but I don’t understand how you can repeat this situation.