From a806b2eca60c7466e3aa899cbb6106df2ca978d9 Mon Sep 17 00:00:00 2001 From: Sander Bouwhuis Date: Sun, 26 Aug 2018 10:57:21 +0200 Subject: [PATCH] Add test for accessing property --- types/elasticsearch/elasticsearch-tests.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/types/elasticsearch/elasticsearch-tests.ts b/types/elasticsearch/elasticsearch-tests.ts index 85574e3c91..c28db244f8 100644 --- a/types/elasticsearch/elasticsearch-tests.ts +++ b/types/elasticsearch/elasticsearch-tests.ts @@ -37,6 +37,14 @@ client.search({ }, (error) => { }); +client.search({ + q: 'pants' +}).then((body) => { + const hit = body.hits.hits[0]; + const names = hit && hit.matched_queries; +}, (error) => { +}); + client.indices.delete({ index: 'test_index', ignore: [404]