I understand that I can no longer access my "groups" field via "ctx._source".
My understanding is I have to use doc.get('groups'), which I think should return to me an array of arrays, but it doesn't look like that is happening.
doc.get('groups')[0] is an index OOB, doc.get('groups').values[0] and doc.get('groups').value[0] is also an index OOB.
So there's something I am missing here. Does doc.get('groups') not return the array of arrays that I can then iterate over?
I'm confused why at this point, "group" is being treated as a string? I think it should be an array because "groups" in my indices is an array of arrays
When I try to access params._source I get a null_pointer_exception.
This script is being executed on a search and with Painless.
This discussion:
Makes it seem like I do not have access to _source from a Painless search script. Is that the case?
If that is the case, is what I am trying to do futile? The doc value for my "groups" field seems flattened so I would not be able to traverse the data structure as I need to.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.