Hi community, I have a problem with a property named "hash" which is of type "keyword". This property is also used for a completion category context.
ElasticSearch Version: docker.elastic.co/elasticsearch/elasticsearch-oss:7.6.2
The mapping of the index is:
{
"mappings": {
"properties": {
"hash": {
"type": "keyword"
},
"value": {
"type": "completion",
"contexts": [
{
"name": "hash",
"type": "category",
"path": "hash"
}
]
}
}
}
}
The index contain this document:
{
"_index":"values_completion",
"_type":"_doc",
"_id":"e044c078f773f973e441125dc0b61e4d",
"_score":1.0,
"_source":{
"hash":"439ad864081de8cd6b28763b5c43566e",
"value":{
"input":[
"92"
]
}
}
}
The query I am attempting to do is:
{
"query": {
"term": {
"hash": "439ad864081de8cd6b28763b5c43566e"
}
},
"size": 10
}
I got no results from ElasticSearch ...
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 1,
"successful": 1,
"skipped": 0,
"failed": 0
},
"hits": {
"total": {
"value": 100,
"relation": "eq"
},
"max_score": 2.4103107,
"hits": []
}
}
Is it possible that the keyword type is not indexed as keyword due to the completion context ?
Thanks you for your time