Planning to do a transaction update and commit as single document throughout the day. How ES segment will create in this behavior and how segment forced to be merged automatically? Kindly provide your suggestions.
Elasticsearch doesn't have any sort of transaction semantics like a relational database. Refreshing the index is asynchronous as well. You can update documents using the _update API or just by sending an HTTP PUT to /index/type/id
. But there is no way to update two thing atomically.
Can we try this solution in java using action_get ?
You can use the _update
API to update a document by sending a script or some fields to merge. You can use GET and POST and version
to do optimistic concurrency control style updates. The _update
API does that internally.
These features are all exposed over the transport client as well as the HTTP API. Switching from one to the other doesn't change the guarantees that Elasticsearch offers.
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.