Have observed that TermStats facet with sort and limit does not return
correct result always!
Digging deeper found that the limit is applied after doing sort at each
Is there any specific reason to apply limit at shard level rather than
doing it at final reducer?
This behavior is evident when data is a bit sparsed.
However when sort is applied with no limit i.e. (size = 0) it behaves well
as the sorting happens at the final reducer after merge of data from each