How to add Percolation at indexing time

//createIndex ...

//Register Percolator

QueryBuilder qb = QueryBuilders.matchQuery("content", "taxes");
client.prepareIndex(index, ".percolator", "harkinQuery")
.field("query", qb) // Register the query
.setRefresh(true) // Needed when the query shall be available immediately

//index with BulkProcessor
for(i=0; i< numDocs; i++)
JSONObject jDoc = getDoc[i];


Percolate API is used like this, but I am not sure how I can use it in
combination with bulk index request shown in my above code?

PercolateResponse response = client.preparePercolate()
//Iterate over the results
for(PercolateResponse.Match match : response) {
//Handle the result which is the name of
//the query in the percolator

You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
For more options, visit