I have a scenario where I need to list a bunch of jobs from elastic search. The searches would mainly be done by keywords eg. (electrical engineering, driver etc.) I want to create a feedback system where corresponding keyword is given higher weightage if the user clicks on a particular job.
So far it is all doable. I am facing problem because in my system user can search with multiple keywords eg. (driver or electrical engineering). Query that would be constructed for this would be as follows
{
"query" : {
"bool": {
"should": [
{
"multimatch": {
"query" : "electrical engineering",
"fields" : [
"description^1.0",
"name^1.0"
]
}
},
{
"multimatch": {
"query" : "driver",
"fields" : [
"description^1.0",
"name^1.0"
]
_} _
}
]
}
},
"sort" : [
{
"score" : {
"order" : "desc"
}
}
]
}
Now in this scenario, is there a way, I can associate a result with a particular multi match clause, so that i can identify that this result is here because of word driver and this is here because of electrical engineering, so that i can complete feedback loop
If anyone has any better idea so that i can complete my feedback loop, please feel free share it.
Thanks