I'm attempting to try to remove items from an ArrayList on a doc, but not having any luck.
source: "for(item in params.tags) { if(ctx._source.tag_list.indexOf(item) !== -1) { ctx._source.tag_list.remove(item) } }",
params: {
tags: tags
}
The code runs, but the indexOf always returns -1 even though the document contains the tags I am trying to remove