Hello.
I noticed for operation bulk update, for example
POST http://localhost:9200/_bulk
{"update":{"_id":"1", "_index" : "index", "_type": "type"}}
{"doc": {"id": "1", "name": "test"}}
if index with name "index" doesn't exist I will recieve response
{
"took": 115,
"errors": true,
"items": [
{
"update": {
"_index": "index",
"_type": "type",
"_id": "1",
"status": 404,
"error": {
"type": "document_missing_exception",
"reason": "[type][1]: document missing",
"index_uuid": "e7URDCeDRJGCclNISsFr2Q",
"shard": "3",
"index": "index"
}
}
}
]
}
and index with name "index" will be created. As I see error absolutely correct, because I don't have any docs, but creating new index is strange for me. I waited for error like "No such index"
Can someone, please, explain such behavior. Is it correct that new index was created? And how can I avoid it without extra check for index existance?