kuzzleio / sdk-javascript

Kuzzle Javascript SDK. High level library including multi-protocol support, offline resiliency, realtime data and more
http://docs.kuzzle.io/sdk/js/7
Apache License 2.0
39 stars 15 forks source link

ENHANCEMENT: Bulk operations (as in ES JS sdk) #187

Closed florianbepunkt closed 7 years ago

florianbepunkt commented 7 years ago

Really awesome work, people. Feature/Enhancement suggestion: It would be helpful performance wise if you could perform CRUD operations in bulk as you can on an elasticsearch instance directly. Like add 50 documents at once for example.

dbengsch commented 7 years ago

An issue is open in our main SDK repository about exposing m* methods into SDKs (mCreate, mReplace, mUpdate, mCreateOrReplace and mDelete): https://github.com/kuzzleio/sdk/issues/6.

You can already call these methods using the query method available on the Kuzzle object (http://docs.kuzzle.io/sdk-reference/#query).

florianbepunkt commented 7 years ago

@dbengsch Thank you. If I understand it correctly these methods won't trigger any events (listeners attached to a collection). I hope this will be possible somewhere down the road. Thank you for this project.

scottinet commented 7 years ago

Not exactly: these routes WILL trigger events.

To import data en masse without triggering events, you have to use our bulk API: http://docs.kuzzle.io/api-reference/#bulk-controller