I'm trying to use a query in Elastic Search, where all English("taal":"engels") books are ignored. I thought I should use a bool query, and a must_not, with the condition the term "taal":"Engels" inside the query.
GET books/_search
{
"query": {
"bool": {
"must_not" : {
"term" : { "taal" : "Engels" }
}
}
}
}
However, when running this query in Kibana it still shows results with language = english.
{
"took": 0,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 501,
"max_score": 1,
"hits": [
{
"_index": "producten4",
"_type": "boek",
"_id": "9780582401815",
"_score": 1,
"_source": {
"isbn": "9780582401815",
"hoofdtitel": "Forrest Gump",
"taal": "Engels",
}
},
ETCETERA....
]
}
}
Mapping of the field taal:
"taal": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
},
"raw": {
"type": "keyword"
},
"taal": {
"type": "text"
}
}
}