I'm trying to get a better understanding of Painless and one thing that seems unclear to me is the doc field:
- What is the difference between
doc['field_name']anddoc['field_name'].value? - Do I access nested fields like
doc['field_name']['nested_field']ordoc['field_name.nested_field']? - I'm kind of unclear on how to use the Painless API page to find methods and properties available for certain data types. For example, I know you can use
[3,4,5].length, but can you uselengthon maps as well as arrays? I see in the docs I can useadd()to add a value to an array, but can I do that with Maps too? What other functions are available? The API page seems hard for me to figure this out.