-
Notifications
You must be signed in to change notification settings - Fork 59
if_seq_no and if_primary_term in bulk action update #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi @ezimuel , I have found that there is a bug in a library and that's causing the problem I have described above. The fix is: diff --git a/lib/Search/Elasticsearch/Client/6_0/Role/API.pm b/lib/Search/Elasticsearch/Client/6_0/Role/API.pm
index db54ae40..6c3ac70e 100644
--- a/lib/Search/Elasticsearch/Client/6_0/Role/API.pm
+++ b/lib/Search/Elasticsearch/Client/6_0/Role/API.pm
@@ -42,7 +42,9 @@ sub api {
'version' => 'version',
'_version' => 'version',
'version_type' => 'version_type',
- '_version_type' => 'version_type'
+ '_version_type' => 'version_type',
+ 'if_primary_term' => 'if_primary_term',
+ 'if_seq_no' => 'if_seq_no',
}
},
'bulk.update' => { I have not got time to create a proper PR yet (and run the unit tests), but if I find time in the coming weeks I will give it a go. |
@fy2 Right now, |
@ezimuel , I think these options are also documented for ES 6 (see "if_seq_no and if_primary_term" section here: https://www.elastic.co/guide/en/elasticsearch/reference/6.8/docs-update.html and in the bulk docs). Thank you very much for your effort to upgrade! |
@fy2 you right! This part of |
Fix for #184 adding if_seq_no and if_primary_term in bulk params
Just released 6.81 version that includes this fix. Updated also CPAN here: https://metacpan.org/release/EZIMUEL/Search-Elasticsearch-6.81 |
Is this the correct way to enter a bulk action for an update using the "if_seq_no" and "if_primary_term" parameters? I ask this because when I try it, I get an error:
Search::Elasticsearch::Error::Unknown params <if_primary_term,if_seq_no> in <update>"
Would you please let me know what the correct usage is?
ES version: 7.6
Search::Elasticsearch version: 6.80
Thanks.
The text was updated successfully, but these errors were encountered: