I'm trying to figure out what I'm doing wrong with my Elastic query. I'm trying to filter out all the docs that have "Software Engineer" as their title. my Query:
{
"from": 0,
"size": 20,
"query": {
"bool": {
"must": [{
"bool": {
"must_not": [{
"term": {
"title.keyword": "Software Engineer"
}
}]
}
}]
}
}
}
in my mapping...
"title": {"type": "text"}
Then my results:
hits:[
{title: "Software Engineer"},
{title: "Engineer"},
{title: "Software Engineer"},
{title: "Software and Data Quality Manager"},
...
]
I would like to not get Software Engineer in my search results here. Any help would be greatly appreciated!
question from:https://stackoverflow.com/questions/66064654/elasticsearch-must-not-returning-wrong-values