Hi,
I have problem with writing query in Elastic. I have 1 milion parts and daily statistic for them. What i want to do is display all parts in 1000 chunks. Generally table with download count
So query in sql would look like
'select count(id) from stats group by part limt 1000'
'select count(id) from stats group by part limt 1000 offset 1000'
And so on.
So in elastic i have to use aggregation but when i do i can`t use 'from' on it.
In ES there is no such thing as a count with a limit. The limit in ES is more of a pagination upper bound - from & size and is not include in the count aggregation.
Any how, I believe "limit" is not of significance in what you're trying to do. In your sql statement, if the results are more than 1000, the count will return 1000. If the count is less than 1000, it will return X, where X <=1000
The above will return the count value of group price. If value_count returns more than 1000, then you just mentally note that is should be 1000. If it is less than 1000, you will know what that X value is.
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.