function testSearchAll() { ESClient.search({ index: "imdb", body: { size: 10, from: 0, query: { match_all: {} } } }) .then(results => { console.log("|Test SearchAll|"); console.log("-----------------------------------"); console.log("Response Body: "); console.log(results); console.log(`found ${results.hits.total} items in ${results.took}ms`); console.log("returned 10 imdb titles:"); results.hits.hits.forEach((hit, index) => console.log(`\t${index} - ${hit._source.title}`) ); }) .catch(console.error); }
'total_edits': body.aggregations.totalChanges.value, 'total_contributors': body.aggregations.userTotal.buckets.length, 'total_results': body.hits.total, 'next_results': '?' + underscore(params) .map(function(val, key) {
for (let i = 0; i < Math.ceil(searchResponse.hits.total / this.bulkSize); i++) { const bulkDelete = []; const dumpDocs = searchResponse.hits.hits; logger.info(`${collectionName} delete progress: ${numDeleted}/${searchResponse.hits.total}`); searchResponse = await this.esClient.scroll({ scrollId: searchResponse._scroll_id,
total: resp.hits.total, aggregations: resp.aggregations.type.buckets, searchString,