Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
public class WorkerThread implements Runnable {
SearchHit hit;
public WorkerThread(SearchHit hit){
this.hit = hit;
public void run() {
//Handle the hit...
String srcIP = "";
String ES_ID = this.hit.getId();
String ES_INDEX = this.hit.getIndex();
System.out.println("Processing "+ES_ID);
Map __source = this.hit.getSource();
srcIP = (String) __source.get("SourceAddress");
//add destination tuples
try {
App.addToBulkRequest(new UpdateRequest().index(ES_INDEX).type(this.hit.getType()).id(ES_ID)
.field("bulk_index", "true")
} catch (IOException e1) {
// TODO Auto-generated catch block
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment