elasticsearch percolate java api example

284 Views Asked by At

Need example for elasticsearch percolate using elasticsearch java rest API

Could not find in elasticsearch docs

In previous versions of elastic below is the code for transport client, not sure which one to be used for rest client

PercolateResponse response = client.preparePercolate()
                        .setIndices("myIndexName")
                        .setDocumentType("myDocumentType")
                        .setSource(docBuilder).execute().actionGet();
1

There are 1 best solutions below

0
On

I figured out that We have to use search api with PercolateQueryBuilder