# How can I get percolation to work?

**URL:** <https://discuss.elastic.co/t/how-can-i-get-percolation-to-work/17522>\
**Category:** Elasticsearch\
**Created:** [May 14, 2014, 8:38pm UTC](https://discuss.elastic.co/t/how-can-i-get-percolation-to-work/17522 "2014-05-14T20:38:49Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IronMike](https://avatars.discourse-cdn.com/v4/letter/i/e9a140/32.png) [@IronMike](https://discuss.elastic.co/u/IronMike)\
**Post date:** [May 14, 2014, 8:38pm UTC](https://discuss.elastic.co/t/how-can-i-get-percolation-to-work/17522/1 "2014-05-14T20:38:49Z")

</div>

Newbie question, I am not very clear on how percolation works.

I have a transportclient using JAVA API, I indexed about 50,000 docs.  
My docs have the following

MyIndex/indexType/id{

title = t,  
content = this is a long content,  
create = created date,  
author = Mike  
.....  
}

From Sense Client, I did

PUT myIndex/.percolator/1  
{  
"query": {  
"match\_phrase": {  
"content": "sky diving"  
}  
}  
}

So the above registers the percolator, and now I want all the documents that match this query, In other words, give me all the documents that have sky diving in it's content field? Am I missing something?

GET /myIndex/medidoc/\_percolate

It returns this? Its asking me to supply a document to percolate, I have seen in the tutorial, but I don't understand it. What is the document like, what if I don't want to provide a document?

{  
"took": 38,  
"\_shards": {  
"total": 5,  
"successful": 4,  
"failed": 1,  
"failures": [  
{  
"index": "myIndex",  
"shard": 2,  
"reason": "BroadcastShardOperationFailedException[[myIndex][2] ]; nested: RemoteTransportException[[node-2][inet[/192.168.1.103:9301]][percolate/s]]; nested: PercolateException[failed to percolate]; nested: ElasticsearchIllegalArgumentException[Nothing to percolate]; "  
}  
]  
},  
"total": 0,  
"matches": []  
}

--  
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).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/66c1c7ff-14fb-41c0-9ee8-b2774fbb57ef%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/66c1c7ff-14fb-41c0-9ee8-b2774fbb57ef%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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, 1:29am UTC](https://discuss.elastic.co/t/how-can-i-get-percolation-to-work/17522/2 "2017-07-06T01:29:21Z")

</div>


