0

How do i perform a query similar to this one in elasticsearch?

SELECT field FROM table GROUP BY field OFFSET 10 LIMIT 10;

Thank for the answer

nogo0d
  • 321
  • 1
  • 3
  • 7
  • Possible duplicate of [How to control the elasticsearch aggregation results with From / Size?](https://stackoverflow.com/questions/43038131/how-to-control-the-elasticsearch-aggregation-results-with-from-size) – John Jones Aug 09 '17 at 00:46

1 Answers1

2

The short answer is that you can't (yet).

There's an open issue titled "Paging aggregation support" that should take care of this feature soon. As you can see that issue is two years old, still open and got many +1 from many people. It's still not slated for any releases yet, though.

In the meantime, you can retrieve your aggregation with size: 20 and then on the client side only consider the last 10 terms.

Val
  • 207,596
  • 13
  • 358
  • 360