Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

elasticsearch _update_by_query with conflicts =proceed

When I used _update_by_query without conflicts option, It caused version_conflict_engine_exception error.

Reading this document, I found that conflicts=proceed can be passed along with the request to avoid this error.

Though I am bit confused with the wording in the documentation. I understand that once conflicts=proceed is specified, it won't abort in between when version conflict occurs.

But will it update those doc where conflict occurred or it will not update those doc and will update only doc where there were no conflicts.

Note: I am using elasticsearch 5.6

like image 609
Rohan Pujari Avatar asked Oct 17 '22 05:10

Rohan Pujari


1 Answers

version conflict occurs when a doc have a mismatch in ID or mapping or fields type. update_by_query will stop when a single doc have conflict and update would not available for rest of docs in that index and next indexes. (of course some doc have been updated) if you use conflict=proceed it will not update only the docs have conflict (just skip that doc not entire index).

like image 144
hamid bayat Avatar answered Oct 21 '22 04:10

hamid bayat