Getting ElasticSearch Percolator Queries Getting ElasticSearch Percolator Queries elasticsearch elasticsearch

Getting ElasticSearch Percolator Queries


For versions 5.x and later

Percolator documents should be returned in a query as with any other document.

Documentation of this new behavior can be found here.

Please note that with the removal of mapping types in 6.x it is unclear what will happen with the percolator index type. The reader may assume that it will be removed and that percolators will/should be stored in separate indices. Separating percolators into isolated indices is usually suggested regardless. Also please note that this 6.x type removal should not affect the answer to this question.

For versions before 5.0

This will return all percolator documents stored in your elasticsearch cluster:

POST _all/.percolator/_search

This searches _all indexes (every index you have registered) for documents of the .percolator type.

It basically does what you describe above: "a match_all with a type filter". Yet it accomplishes it in a slightly different way.

I have not played around with this much more than this, but I assume this would actually allow you to perform a query/filter on percolators if you are looking for a percolator of a particular type.