Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
salim-b authored Aug 11, 2023
1 parent 1243fd8 commit 42a203e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1793,10 +1793,14 @@ You can skip the first loop when your document data has just one index as the ou

### Add/Update/Remove Documents to/from the Index

Just pass the document array (or a single object) to the index:
Add a document to the index:

```js
index.add(docs);
index.add({
id: 0,
title: "Foo",
content: "Bar"
});
```

Update index with a single object or an array of objects:
Expand Down

0 comments on commit 42a203e

Please sign in to comment.