Multipercolation not working after 3 queries

I tried the below multi percolation query from postman. I was able to execute till 175 queries.
If I try with more number of queries, it was crashing and the postman was getting closed.



Then I tried calling this from Java Jersey Client .

I have created this particular query in the given format.
WebTarget target =;
Response response = target.request().post(Entity.entity(String.valueOf(body), MediaType.APPLICATION_JSON));

the variable body holds this query json. When there is only 2 query, it executes and gives the response. For 3 or more queries it throws the below exception.
{"error":"ElasticsearchParseException[Expected field]","status":400}
Please help me on this.

This indicates a parsing error. I think something goes wrong when you build the request body?
Can you share the actual request body that you send to ES?


This is what I have in the body

That looks ok. Are you sending a newline (\n or \r\n) after each line (also the last line)? If you miss a new line then parsing on the ES side fails.

Sorry.I added \n only one time. I need to add it two times like "\n{}\n"
Now its working.
Thanks for your help.