From b1a9e0ae413d685e85c5832f13ae5ddc5f2b790a Mon Sep 17 00:00:00 2001 From: jia wei Date: Wed, 7 Jul 2021 19:42:25 +0800 Subject: [PATCH] fix: add indexes --- README.md | 2 +- examples/conn.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 29eb314..9314b57 100644 --- a/README.md +++ b/README.md @@ -114,7 +114,7 @@ const reIndex = async () => { const stat = async () => { try { - const info = await client.indicesStats({ + const info = await client.indices.stats({ // index: "myindex", }); console.log(info); diff --git a/examples/conn.ts b/examples/conn.ts index 4b855f5..1715df8 100644 --- a/examples/conn.ts +++ b/examples/conn.ts @@ -77,7 +77,7 @@ const deleteByQuery = async () => { try { const info = await client.deleteByQuery({ index: "myindex", - data: { + body: { query: { "bool": { "must": [{ @@ -107,7 +107,7 @@ const reIndex = async () => { const stat = async () => { try { - const info = await client.indicesStats({ + const info = await client.indices.stats({ // index: "myindex", }); console.log(info);