From 42a203e120ecf4a770f162efcbc9b89bd18b26c0 Mon Sep 17 00:00:00 2001 From: Salim B Date: Fri, 11 Aug 2023 20:56:09 +0200 Subject: [PATCH] Update README see https://github.com/nextapps-de/flexsearch/issues/237#issuecomment-872078905 --- README.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 28b7c37..29efcbd 100644 --- a/README.md +++ b/README.md @@ -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: