Getting the value of a doc field inside FilterScript plugin

Hi! I need to fetch the value of the _id (or other doc fields).

Currently, I'm doing it like this:

Is this the proper way to do it? It feels wrong. Especially fetching _id since it even throws a warning about the deprecation of using _id in aggregations.

Unfortunately, Elasticsearch plugin documentation is almost inexistent :frowning:

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.