Get every n-th result ordered by date

Hello together,

i have the following use case:

  1. Let's say i have 1000 Documents in my index.
  2. I want to sort them by date
  3. And just have every n-th document (modulo) in my response

Is this somehow possible? I thried to implement a native plugin, with a as
a script filter in the post filter but i could not figure out, how to
access the position in the resultset.
Any other ideads?

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit