How can I check which document causes this error? Because I made sure the author field exists, is an array, and the 0 index exists, so I have no idea why I still get the null pointer exception
What versions are you working with? You might have documents without the _source field. Easiest way to check and fix if that's the case is to wrap it all in another IF clause that checks for the _source field before everything.
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.