From 950abe648147504a98ea75f6389a81f2814b0878 Mon Sep 17 00:00:00 2001 From: nkzawa Date: Thu, 20 Feb 2020 21:54:38 +0900 Subject: [PATCH] fix example for new client --- README.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2a32cbf..f02ebc0 100644 --- a/README.md +++ b/README.md @@ -27,18 +27,17 @@ Once running any algolia client can be used. ```javascript const client = algoliasearch('app-id', 'api-key', { - protocol: 'http:', - hosts: { - read: ['localhost:9200'], - write: ['localhost:9200'] - } + hosts: [{ + protocol: 'http', + url: 'localhost:9200' + }] }) const index = client.initIndex('entries'); -await index.addObject({ +await index.addObject({ title: 'Algolia 2019', - contentType: 'events' + contentType: 'events' }) const result = await index.search('Algolia') @@ -48,4 +47,4 @@ const result = await index.search('Algolia') ``` docker run --rm -p 9200:9200 --name algolite marconi1992/algolite:0.1.1 -``` \ No newline at end of file +```