Painless scripts allow to customize a lot of things in Elasticsearch. One thing that (almost) every script has in common is the access of document fields. There are two different ways to do so and every developer should know them. Because it can have a huge impact on the performance. An Example Let’s start with