Elastics search provides feature to get search results and suggestions in a single request, reducing network overhead.
POST my-index-000001/_search
{
"query" : {
"match": {
"message": "tring out Elasticsearch"
}
},
"suggest" : {
"my-suggestion" : {
"text" : "tring out Elasticsearch",
"term" : {
"field" : "message"
}
}
}
}
I believe internally these two clause are executed parallelly as there is no dependency between them. However, I couldn't find this information documented anywhere, reaching out here for confirmation.
Thanks
Raj