I'm reading about partial updates and found that we cannot use external version with partial updates. However, I see that ES has introduced seq_no and primary_term for concurrency control. I see that seq_no is automatically incremented with every change but I cannot set it myself. Is there a way to set custom value for seq_no and/or primary_term for partial updates?
Thanks for the reply Alexander. I have looked at the Update API which supports both if_seq_no and if_primary_term, however, it appears that Elasticsearch sets these values and as a user we don't have an option to update these values. For instance, let's say this is what I get for a GET request.
For the update API, I have to set if_seq_no to 10 and _primary_term to 1, otherwise I get a version_conflict_engine_exception. Note that I'm using external_version too, which I cannot use for partial update.
However, I want to send my custom seq_no. Let's say I want both seq_no and version to be the same.
POST localhost:9200/test/test/abcd/_update?if_seq_no=50&if_primary_term=1
{
"doc": {
"name": "test"
}
}
This request also fails with version_conflict_engine_exception. I was wondering if we can supply external version for seq_no and/or primary_term.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.