0

I'm wanting to retrieve the number of indices in my ES cluster from within a scripted field of an aggregation.

I know you can access some context values with ctx._source but does anyone know how to get the total number of indeces from my cluster?

Thanks!

Joe - GMapsBook.com
  • 15,787
  • 4
  • 23
  • 68
Louis Hulot
  • 357
  • 2
  • 13

1 Answers1

0

That's not possible. The ctx context has no idea about the state of your cluster. It has only access to the currently iterated doc.

Joe - GMapsBook.com
  • 15,787
  • 4
  • 23
  • 68