# How to use Bulk API to load percolator queries?

**URL:** <https://discuss.elastic.co/t/how-to-use-bulk-api-to-load-percolator-queries/14106>\
**Category:** Elasticsearch\
**Created:** [October 25, 2013, 2:49am UTC](https://discuss.elastic.co/t/how-to-use-bulk-api-to-load-percolator-queries/14106 "2013-10-25T02:49:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ali\_3](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@Ali\_3](https://discuss.elastic.co/u/Ali_3)\
**Post date:** [October 25, 2013, 2:49am UTC](https://discuss.elastic.co/t/how-to-use-bulk-api-to-load-percolator-queries/14106/1 "2013-10-25T02:49:30Z")

</div>

Hi, I am trying to bulk load into the \_percolator index.

Unfortunately I am getting _{"error":"ActionRequestValidationException[Validation  
Failed: 1: no requests added;]","status":500}_  
here are the contents of my file: bulk\_one (it just has one query for  
testing purpose)

curl -XPOST localhost:9200/\_bulk --data-binary @bulk\_one (command I used)

* * *

{ "index" : { "\_index" : "\_percolator", "\_type" : "for\_sale\_listing", "\_id"  
: "9999-5268ae33140b548fe2000007" }}  
{"query":{"filtered":{"query":{"match\_all":{}},"filter":{"and":[{"and":[{"range":{"baths":{"from":1,"to":10}}},{"range":{"beds":{"from":0,"to":4}}},{"range":{"price":{"from":0,"to":8000}}},{"query":{"match\_phrase":{"postal\_code":"95930"}}},{"query":{"match\_phrase":{"city":"Sts,  
CA"}}}]}]}}}}

* * *

Note: there are just two lines one with meta info and second line that  
contains the query I want to put in the \_percolator index  
I am curious whether this is even possible.

Any help would be greatly appreciated.

Thank you,

-A

--  
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 [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 2:10am UTC](https://discuss.elastic.co/t/how-to-use-bulk-api-to-load-percolator-queries/14106/2 "2017-07-06T02:10:42Z")

</div>


