IndexReader reader = writer.getReader();
writer.close();
IndexSearcher searcher = newSearcher(reader);
PayloadSpanUtil psu = new PayloadSpanUtil(searcher.getTopReaderContext());
Collection<byte[]> payloads = psu.getPayloadsForQuery(new TermQuery(new Term(PayloadHelper.FIELD, "rr")));
if(VERBOSE) {
System.out.println("Num payloads:" + payloads.size());
for (final byte [] bytes : payloads) {
System.out.println(new String(bytes, StandardCharsets.UTF_8));
}