@@ -70,7 +70,7 @@ let documents = [
7070 { book_id: 42 , title: " The Hitchhiker's Guide to the Galaxy" },
7171]
7272
73- await meili .Index (' books' ).addDocuments (documents) // { "updateId": 0 }
73+ await meili .Index (' books' ).addOrReplaceDocuments (documents) // { "updateId": 0 }
7474```
7575
7676With the ` updateId ` , you can check the status (` processed ` of ` failed ` ) of your documents addition thanks to this [ method] ( #update-status ) .
@@ -146,7 +146,7 @@ let myDocuments = await meili
146146#### Add documents <!-- omit in toc -->
147147
148148``` javascript
149- meili .Index (' books' ).addDocuments ([{ book_id: 2 , title: ' Madame Bovary' }])
149+ meili .Index (' books' ).addOrReplaceDocuments ([{ book_id: 2 , title: ' Madame Bovary' }])
150150```
151151
152152Response:
@@ -333,10 +333,14 @@ This package works for MeiliSearch `v0.9.x`.
333333
334334### Documents
335335
336- - Add or update multiples documents:
336+ - Add or replace multiple documents:
337337
338338` meili.Index('xxx').addDocuments(documents: object[]): Promise<Types.AsyncUpdateId> `
339339
340+ - Add or update multiple documents:
341+
342+ ` meili.Index('xxx').updateDocuments(documents: object[]): Promise<Types.AsyncUpdateId> `
343+
340344- Get Documents:
341345
342346` meili.Index('xxx').getDocuments(params: Types.getDocumentsParams): Promise<object[]> `
@@ -349,7 +353,7 @@ This package works for MeiliSearch `v0.9.x`.
349353
350354` meili.Index('xxx').deleteDocument(documentId: string): Promise<Types.AsyncUpdateId> `
351355
352- - Delete multiples documents:
356+ - Delete multiple documents:
353357
354358` meili.Index('xxx').deleteDocuments(documentsIds: string[]): Promise<Types.AsyncUpdateId> `
355359
0 commit comments