I'm using elasticsearch built-in SQL for aggregation query, and the maximum number of results I get is always 1,000 - even when I set LIMIT. When I use the translate API, I understand the 1,000 is because the composite aggregation size is 1,000.
POST localhost:9200/_sql/translate
{
"query" : "SELECT productName, count(*) as cnt FROM \"INDEX_NAME\" GROUP BY productName LIMIT 5000",
"fetch_size": 50
}
and doesn't have to do with the LIMIT set.
With limit 5000 and fetch_size 50 you will still get 5000 rows (if exist) but in 100 pages of 50 rows each. You can find more information about pagination here.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.