Hello,
I'm having an issue with keyword search not behaving how I would expect from the docs. I can see that the following document exists in my index:
{
"_index": "my-index",
"_type": "_doc",
"_id": "A-A1055-62",
"_score": 9.326463,
"_source": {
"color": "AA105562",
"description": "red"
}
}
But a keyword term query on my-index does not return any results:
{
"size": 1,
"query": {
"bool": {
"must": [
{
"term": {
"color.keyword": {
"value": "AA105562",
"boost": 1.0
}
}
}
],
"adjust_pure_negative": true,
"boost": 1.0
}
}
}
My mapping is set as:
"my-index": {
"mappings": {
"properties": {
"color": {
"type": "keyword"
},
}
}
}
From the docs, I would have expected that a term query on color.keyword would find the document since the strings are identical. What am I missing?