For multiple terms/fields, you'll need to load a PostingsEnum for each term. See line 109 in the example you linked. You then need to call setDocument on all of your postings inside ScriptScore.setDocument on line 126. This will ensure your postings enums are ready to read inside ScriptScore.execute.
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.