ElasticSearch 6.3
I create one index call [myindex3]. It's mapping look like below.
{
"myindex3": {
"mappings": {
"_doc": {
"properties": {
"tags": {
"type": "long"
}
}
}
}
}
}
I can create docs which has string value in the [tags] filed . See below:
{
"took": 1,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 2,
"max_score": 1,
"hits": [
{
"_index": "myindex3",
"_type": "_doc",
"_id": "2",
"_score": 1,
"_source": {
"tags": "123"
}
},
{
"_index": "myindex3",
"_type": "_doc",
"_id": "1",
"_score": 1,
"_source": {
"tags": 123
}
}
]
}
}