meilisearch-swift icon indicating copy to clipboard operation
meilisearch-swift copied to clipboard

Add methods to automatically add/update documents in batches

Open curquiza opened this issue 4 years ago • 0 comments
trafficstars

We need methods to add and update the documents of MeiliSearch in batch instead of letting the users call addDocuments in a loop.

  • [ ] Add addDocumentsInBatches
addDocumentsInBatches(documents, batchSize = 1000, primaryKey = nil)

batchSize and primaryKey are optional parameters

  • [ ] Add updateDocumentsInBatches
updateDocumentsInBatches(documents, batchSize = 1000, primaryKey = nil)

batchSize and primaryKey are optional parameters

  • [ ] Add tests

Example: https://github.com/meilisearch/meilisearch-python/pull/260

⚠️ This issue is generated, it means addDocumentsInBatches andd updateDocumentsInBatches might be named differently in this package. Keep the already existing way of naming in this package to stay idiomatic with the language and the repository. Also, if you are a maintainer, feel free to add any clarification and instruction about this issue related to the specific languages of the repo.

Related to https://github.com/meilisearch/integration-guides/issues/106

Sorry if this is already partially/completely implemented, feel free to let me know about the state of this issue in the repo.

curquiza avatar Oct 06 '21 14:10 curquiza