Skip to content

Commit

Permalink
Merge pull request #400 from salim-b/fix-readme
Browse files Browse the repository at this point in the history
Fix README
  • Loading branch information
ts-thomas authored Jan 6, 2024
2 parents 74a2d5e + 42a203e commit 9e2f218
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 @@ -1795,10 +1795,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 9e2f218

Please sign in to comment.