How to iterate through a nested array in elasticsearch with filter script?
问题 I am trying to filter for a nested field in elasticsearch. Well, I need to return certain documents depending on certain rules. To reproduce the error I'm getting, you can be guided by this example: PUT my-index-000001 { "mappings": { "properties": { "user": { "type": "nested" } } } } PUT my-index-000001/_doc/1 { "group": "fans", "user": [ { "first": "John", "last": "Smith" }, { "first": "Alice", "last": "White" } ] } As can be seen, we have an array of objects (nested). I need to apply a