Created
August 8, 2019 13:43
-
-
Save kartikchauhan/c89a2776f8f90c20d5e4e6997c13a09b to your computer and use it in GitHub Desktop.
Elastic search node.js client response
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"body": { | |
"took": 1277, | |
"timed_out": false, | |
"_shards": { | |
"total": 1, | |
"successful": 1, | |
"skipped": 0, | |
"failed": 0 | |
}, | |
"hits": { | |
"total": { | |
"value": 10000, | |
"relation": "gte" | |
}, | |
"max_score": 1, | |
"hits": [ | |
{ | |
"_index": "indexName", | |
"_type": "_doc", | |
"_id": "2f0e4524-1203-40a6-8527-aa980fc349a7[8196858]", | |
"_score": 1, | |
"_source": { | |
"doc": { | |
"owner": "059d2569-f268-417f-906b-cbed1f6fbcec", | |
"parentKey": [ | |
{ | |
"value": "Value3", | |
"name": "Name3" | |
}, | |
{ | |
"value": "Value4", | |
"name": "Name4" | |
} | |
] | |
}, | |
"@version": "1", | |
"doc_as_upsert": true, | |
"@timestamp": "2019-07-31T09:29:27.644Z" | |
} | |
}, | |
{ | |
"_index": "indexName", | |
"_type": "_doc", | |
"_id": "6f5652a3-8b33-4c53-8bea-316e8ab1b8c5[8201864]", | |
"_score": 1, | |
"_source": { | |
"doc": { | |
"owner": "71a83599-1751-4fa4-896a-46b644f29a50" | |
"parentKey": [ | |
{ | |
"value": "Value1", | |
"name": "Name1" | |
}, | |
{ | |
"value": "Value2", | |
"name": "Name2" | |
} | |
] | |
}, | |
"@version": "1", | |
"doc_as_upsert": true, | |
"@timestamp": "2019-07-31T09:29:33.795Z" | |
} | |
} | |
] | |
} | |
}, | |
"statusCode": 200, | |
"headers": { | |
"content-type": "application/json; charset=UTF-8", | |
"date": "Thu, 08 Aug 2019 13:27:15 GMT", | |
"server": "nginx/1.12.2", | |
"content-length": "113899", | |
"connection": "keep-alive" | |
}, | |
"warnings": null, | |
"meta": { | |
"context": null, | |
"request": { | |
"params": { | |
"method": "GET", | |
"path": "/indexName/_search", | |
"body": "", | |
"querystring": "", | |
"headers": { | |
"User-Agent": "elasticsearch-js/7.3.0 (linux 3.10.0-862.9.1.el7.x86_64-x64; Node.js v8.9.4)", | |
"Content-Type": "application/json", | |
"Content-Length": "0" | |
}, | |
"timeout": 30000 | |
}, | |
"options": { | |
"size": 0, | |
"aggs": { | |
"parentKey": { | |
"nested": { | |
"path": "doc.parentKey" | |
}, | |
"aggs": { | |
"response": { | |
"aggs": { | |
"name": { | |
"terms": { | |
"field": "doc.parentKey.name.keyword" | |
}, | |
"aggs": { | |
"value": { | |
"terms": { | |
"field": "doc.parentKey.value.keyword" | |
} | |
} | |
} | |
} | |
}, | |
"filter": { | |
"term": { | |
"doc.parentKey.name.keyword": "63bb04a3eb41417e8d0e61e074293581" | |
} | |
} | |
} | |
} | |
} | |
}, | |
"warnings": null | |
}, | |
"id": 1 | |
}, | |
"name": "elasticsearch-js", | |
"connection": { | |
"url": "http://elasticsearch", | |
"id": "http://elasticsearch", | |
"headers": {}, | |
"deadCount": 0, | |
"resurrectTimeout": 0, | |
"_openRequests": 0, | |
"status": "alive", | |
"roles": { | |
"master": true, | |
"data": true, | |
"ingest": true, | |
"ml": false | |
} | |
}, | |
"attempts": 0, | |
"aborted": false | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment