Remove index refresh

This commit is contained in:
Liz Snyder 2021-08-26 13:34:19 -07:00
parent 4d39000cd3
commit 51d359ec40
1 changed files with 2 additions and 6 deletions

View File

@ -95,17 +95,13 @@ async function search() {
var response = await client.index({ var response = await client.index({
id: id, id: id,
index: index_name, index: index_name,
body: document body: document,
refresh: true
}) })
console.log('Adding document:') console.log('Adding document:')
console.log(response.body) console.log(response.body)
// Force an index refresh so the subsequent search returns results.
client.indices.refresh({
index: index_name
})
// Search for the document. // Search for the document.
var query = { var query = {
'query': { 'query': {