Elasticsearch how to support transaction involving multiple documents


(王奕然) #1

i use elasticsearch,and Denormalizing Data,like

PUT /my_index/user/1
{
"name": "John Smith",
"email": "john@smith.com",
"dob": "1970/10/24"
}

PUT /my_index/blogpost/2
{
"title": "Relationships",
"body": "It's complicated...",
"user": {
"id": 1,
"name": "John Smith"
}

}
but the problem is that Elasticsearch does not support ACID transactions. Changes to individual documents are ACIDic, but not changes involving multiple documents.if i want to change /my_index/user/1 and /my_index/blogpost/2 user name at one transaction,if one error it will rollback, how to do that?


(Mark Walkom) #2

You'd need to handle that in your application code.


(system) #3

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