I'm so new for elastic/app-searce.
I'm using @elastic/app-search-javascript@7.6.0.
I need client.search results and client.querySuggestion's result at once, so I wrote code like this.
client.querySuggestion(keyword, option)
.then(resultList => {
target.innerHTML = ''
let results = resultList.results.documents
target.append(...)
client.search(keyword, options)
.then(resultList => {
resultList.results.forEach(result => {
target.append(...)
})
})
})
As you just read, I queried twice(querySuggestion and search) and I think it'll be slow.
Is there any function or way to get both results at once?
Thanks for reading, thanks for helping me!