# Percolate existing doc by id returns incorrect matches

**URL:** <https://discuss.elastic.co/t/percolate-existing-doc-by-id-returns-incorrect-matches/22947>\
**Category:** Elasticsearch\
**Created:** [March 27, 2015, 4:58pm UTC](https://discuss.elastic.co/t/percolate-existing-doc-by-id-returns-incorrect-matches/22947 "2015-03-27T16:58:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gopi\_M](https://avatars.discourse-cdn.com/v4/letter/g/f19dbf/32.png) [@Gopi\_M](https://discuss.elastic.co/u/Gopi_M)\
**Post date:** [March 27, 2015, 4:58pm UTC](https://discuss.elastic.co/t/percolate-existing-doc-by-id-returns-incorrect-matches/22947/1 "2015-03-27T16:58:24Z")

</div>

We are trying to percolate an existing documents in ES index. But it always  
return 0 matches. But when I run percolator by supplying the document in  
the body returns matches

These are the steps I followed,

_CreatE a new index_

PUT /new-perc-test  
{  
"mappings": {  
"inventory": {  
"properties": {  
"count": {"type": "integer"},  
"type": {"type": "string"}  
}  
}  
}  
}

_Registered a query_

PUT /new-perc-test/.percolator/1  
{  
"query": {  
"match": {  
"type": "mobiles"  
}  
}  
}

_Index a document_

PUT /new-perc-test/inventory/_doc2_  
{  
"count": 12,  
"type": "mobiles"  
}

On successful indexing, _ran percolator_ using

GET /new-perc-test/inventory/_doc2_/\_percolate

Returns 0 matches. I'm not sure what we are missing here? Appreciate any  
help. Thanks in advance

--  
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/7a1dc46a-d815-4166-b576-7e45f280eec6%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/7a1dc46a-d815-4166-b576-7e45f280eec6%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, 12:23am UTC](https://discuss.elastic.co/t/percolate-existing-doc-by-id-returns-incorrect-matches/22947/2 "2017-07-06T00:23:26Z")

</div>


