elasticsearch-sql icon indicating copy to clipboard operation
elasticsearch-sql copied to clipboard

Paging does not work with aggregation query by command OFFSET ... LIMIT ...

Open apkcombodev opened this issue 8 years ago • 9 comments

Paging does not work with query: SELECT *, COUNT(*) FROM users GROUP BY city OFFSET 10 LIMIT 10

ES does not support paging for aggregation query, but elasticsearch-sql can be support fake paging for aggregation query in memory. Please support the feature. Thanks

apkcombodev avatar Sep 09 '16 04:09 apkcombodev

Caching result query in memory may crash user's application ,or may even crash ES. Also this behavior can cause some confusion in people who lack of basic search engine concept.

allwefantasy avatar Sep 09 '16 08:09 allwefantasy

I don't need caching in memory. Just simple paging on result list by command OFFSET ... LIMIT ... Ex: SELECT *, COUNT(*) FROM users GROUP BY city OFFSET 10 LIMIT 10 Total may be 1000 documents but I need the result list must be 10 documents from OFFSET 10

apkcombodev avatar Sep 09 '16 09:09 apkcombodev

+1 Please support the feature. Thanks

ikingnet avatar Sep 14 '16 09:09 ikingnet

+1 for this feature!

dangnhdev avatar Sep 16 '16 06:09 dangnhdev

+1 (is there an alternative such as NOT IN (), in such way at least we can exclude the docs in the first offset?)

vg-github avatar Nov 29 '16 00:11 vg-github

+1 I also need paging after aggregation

jianggr avatar Apr 22 '17 03:04 jianggr

+1 for this feature!

chomenko avatar Apr 27 '17 07:04 chomenko

+1 for this feature!

opensure avatar Jun 29 '17 06:06 opensure

+1 for this feature!

stailer avatar Apr 12 '20 17:04 stailer