feathersjs-ecosystem / feathers-elasticsearch

Feathersjs adapter for Elasticsearch
MIT License
78 stars 24 forks source link

Patch bulk multi support #85

Open orgalaf opened 5 years ago

orgalaf commented 5 years ago

This PR adds support for patching multiple docs in batches by sending an array of docs in the data. If data sent to patch is an array, patch-bulk will build a batch update that updates each doc separately rather than finding all docs that match a criteria and updating all of them with the same changes.

orgalaf commented 5 years ago

havent added tests for it yet. let me know if you like the idea and then i'll add. tnx

orgalaf commented 5 years ago

@daffl what do you think of this? We had to fork the repo to add this or our app could not use this plugin at scale. Adding this feature makes bulk writes possible which allows for much better efficiency indexing to ES.

daffl commented 5 years ago

LGTM, thought @jciolek might chime in but I can release it with some tests added and the necessary documentation updates.

orgalaf commented 5 years ago

cool I'll try to add tests and docs in the next few days. thanks!

On Wed, Jun 26, 2019 at 6:33 PM David Luecke notifications@github.com wrote:

LGTM, thought @jciolek https://github.com/jciolek might chime in but I can release it with some tests added and the necessary documentation updates.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/feathersjs-ecosystem/feathers-elasticsearch/pull/85?email_source=notifications&email_token=AK76OY7O6ZO6LJNR2SVEMR3P4OD23A5CNFSM4HNEDUB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYT5QVI#issuecomment-505927765, or mute the thread https://github.com/notifications/unsubscribe-auth/AK76OY2F7NTP6UJ4Q6QUWA3P4OD23ANCNFSM4HNEDUBQ .

jciolek commented 5 years ago

Hey @orgalaf, thanks for contributing!

I've noticed that the tests are failing: https://travis-ci.org/feathersjs-ecosystem/feathers-elasticsearch/builds/551348861

No idea why it's not showing in the PR. Could you rebase against master and see what happens then?

orgalaf commented 5 years ago

Sure thing. I'll try to get to it asap. Thanks for the heads up!

On Fri, Jun 28, 2019 at 2:56 AM Jacek Ciolek notifications@github.com wrote:

Hey @orgalaf https://github.com/orgalaf, thanks for contributing!

I've noticed that the tests are failing: https://travis-ci.org/feathersjs-ecosystem/feathers-elasticsearch/builds/551348861

No idea why it's not showing in the PR. Could you rebase against master and see what happens then?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/feathersjs-ecosystem/feathers-elasticsearch/pull/85?email_source=notifications&email_token=AK76OY4ATHVA5C3OLGAWGITP4VHSDA5CNFSM4HNEDUB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODYYVZHQ#issuecomment-506551454, or mute the thread https://github.com/notifications/unsubscribe-auth/AK76OY4ET4WXWBCZLP6GUXTP4VHSDANCNFSM4HNEDUBQ .