ES newbie here. We have an index with non-dynamic mapping. When I put a document, it replaces existing one (I see big number in "_version") instead of adding new. I don't explicitly define any doc id, should I generate a random one?
Document sample:
{
"environment": "acl-distributiondev1_logs-develop",
"log_event": {
"full_message": "START RequestId: da8fa922-8cb4-4e24-9aa0-654f06b28cfe Version: $LATEST\n",
"id": "34933837981111111111111158539671171070636938547602391040",
"request_id": "da8fa922-8cb4-4e24-9aa0-654f06b28cfe",
"timestamp": 1566487472539,
"type": "START"
},
"log_group": "/aws/lambda/function",
"log_stream": "2019/08/22/[$LATEST]0b98ccbf0a1111b989ff1707b285a78b",
"log_stream_id": "0b98ccbf0a1111b989ff1707b285a78b",
"owner": "024031111114",
"record_timestamp": 1566487473520,
"region": "eu-west-1"
}
Mapping:
{
"mappings": {
"_doc": {
"properties": {
"log_stream_id": {
"type": "keyword"
},
"region": {
"type": "keyword"
},
"record_timestamp": {
"type": "date"
},
"owner": {
"type": "text"
},
"log_group": {
"type": "keyword"
},
"log_stream": {
"type": "text"
},
"environment": {
"type": "keyword"
},
"log_event": {
"properties": {
"id": {
"type": "keyword"
},
"request_id": {
"type": "keyword"
},
"timestamp": {
"type": "date"
},
"type": {
"type": "keyword"
},
"full_message": {
"type": "text"
}
}
}
}
}
}
}
What am I doing wrong?