Document field type (integer) does not match mapping (keyword)

A document in my Elasticsearch cluster has a field whose type conflicts with the mapping for that index. In this case, the mapping type is keyword, whereas the value of the field in the document is an integer.

The field in question in the mapping:

$ curl -sS localhost:9200/indexname/_mapping | jq '.indexname.mappings.properties.foo.properties.should_be_keyword.type'
"keyword"

The field in question in the document (note truncated integer value):

$ curl -sS localhost:9200/indexname/_search -H 'Content-type: application/json' -d '{"query":{"term":{"_id":"1ae3f3cd-0741-4977-ae4b-358033810e28"}}}' | jq '.hits.hits[0]._source.foo.should_be_keyword'
1364401746309800000

Can anyone explain this behavior?

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.