I wanted to know if there is a difference in executing these two queries when the result response is consisting of only 3 documents.
query1:
{
"size":10,
"query": {
"bool":{
"must":[
{
"term":{
"type":"sometype"
}
}
]
}
}
}
query 2:
{
"size":2147483647,
"query": {
"bool":{
"must":[
{
"term":{
"type":"sometype"
}
}
]
}
}
}
the query with size:10 gave immediate response (3 documents that existed), whereas the 2nd query took a whole long time and caused my ES to be unresponsive and ultimately went down.
I'd like to know the reason behind this.
Details: I was working in a 10 node cluster for a 2 TB index (size seems pretty huge for a 10 node cluster). Each node with 30 GB ES heap size.