Bulk-add percolator queries

I want to throw my many documents to a LOT of percolator queries (my query count is in the 6-digit). I've found how to multi-percolate many documents at once, but haven't found how to bulk-add many queries at once.

Any ideas?

According to the documentation, I can register a query in the percolator using:

curl -XPUT 'localhost:9200/my-index/.percolator/1' -d '{
    "query" : {
        "match" : {
            "message" : "bonsai tree"

Can I add many of these in one fell swoop?

I've set a bounty on SO, if that can motivate anybody :thumbsup:

Why not use the _bulk API (https://www.elastic.co/guide/en/elasticsearch/reference/current/docs-bulk.html) and set the index as my-index the type as .percolator and the body as the query?

I haven't actually tried this out but I imagine it should work given that you can register percolator queries using the standard index API


That worked! Thanks!!!