How to insert a scripted field using igestion pipeline
问题 So I have two fields in my docs { emails: ["", "", ""] name: "", } And I want to have a new field once the docs are indexed called uid which will just contain the concatenated strings of all the emails and the name for every doc. I am able to get scripted field like that using this GET request on my index _search endpoint { "script_fields": { "combined": { "script": { "lang": "painless", "source": "def result=''; for (String email: doc['emails.keyword']) { result = result + email;} return doc