Skip to content

Instantly share code, notes, and snippets.

@redcho
Created January 7, 2019 20:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save redcho/d7b0fbbc2f54e0822221cb9ac42f85ba to your computer and use it in GitHub Desktop.
Save redcho/d7b0fbbc2f54e0822221cb9ac42f85ba to your computer and use it in GitHub Desktop.
for(int i = 0; i < reader.maxDoc(); i++){
if(((DirectoryReader) reader).isCurrent()){
Document document = reader.document(i);
String source = document.getBinaryValue("_source").utf8ToString();
System.out.println(source);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment