# Percolate on all indexes/all doc of same type

**URL:** <https://discuss.elastic.co/t/percolate-on-all-indexes-all-doc-of-same-type/6041>\
**Category:** Elasticsearch\
**Created:** [December 1, 2011, 3:33pm UTC](https://discuss.elastic.co/t/percolate-on-all-indexes-all-doc-of-same-type/6041 "2011-12-01T15:33:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aurelien\_2](https://avatars.discourse-cdn.com/v4/letter/a/a587f6/32.png) [@Aurelien\_2](https://discuss.elastic.co/u/Aurelien_2)\
**Post date:** [December 1, 2011, 3:33pm UTC](https://discuss.elastic.co/t/percolate-on-all-indexes-all-doc-of-same-type/6041/1 "2011-12-01T15:33:50Z")

</div>

Hello.

I'm using ES in REST to index same type of document over multiples  
indexes, and I was planning to use percolate to permit users to write  
rules. Those rules may be restricted to a single index, but may be for  
all the documents of a type on all indexes.

I'd like to know if there's a way to use register and percolate  
queries on all the indexes or to percolate a resultset from a query, I  
did not find anything like this on documentation nor mailing list. API  
shows examples for percolating on one single index.

Thanks

Aurélien.

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [December 4, 2011, 2:06pm UTC](https://discuss.elastic.co/t/percolate-on-all-indexes-all-doc-of-same-type/6041/2 "2011-12-04T14:06:36Z")

</div>

No, you can't register a percolate query against all indices..., it has to  
be on a specific index.

On Thu, Dec 1, 2011 at 5:33 PM, Aurélien [aurelien.dehay@gmail.com](mailto:aurelien.dehay@gmail.com) wrote:

> Hello.
> 
> I'm using ES in REST to index same type of document over multiples  
> indexes, and I was planning to use percolate to permit users to write  
> rules. Those rules may be restricted to a single index, but may be for  
> all the documents of a type on all indexes.
> 
> I'd like to know if there's a way to use register and percolate  
> queries on all the indexes or to percolate a resultset from a query, I  
> did not find anything like this on documentation nor mailing list. API  
> shows examples for percolating on one single index.
> 
> Thanks
> 
> Aurélien.

---

<div class="post-metadata">

**Author:** ![Kenneth\_Loafman\_2](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kenneth_loafman_2/32/2224_2.png) [@Kenneth\_Loafman\_2](https://discuss.elastic.co/u/Kenneth_Loafman_2)\
**Post date:** [December 4, 2011, 3:51pm UTC](https://discuss.elastic.co/t/percolate-on-all-indexes-all-doc-of-same-type/6041/3 "2011-12-04T15:51:55Z")

</div>

But you can make it work similar to the way you want. The way we do it is  
to assign dummy indexes, 'includes', and 'excludes'. When a rule is set  
up as an include the return values from percolate tells us which index(es)  
the document needs to be stored into. Similarly, when a rule is set up as  
an exclude the return values from percolate tell us which index(es) the  
document needs to be excluded from. The difference between these two sets  
of indexes determines if and where the document is stored.

Hope this helps.

...Ken

On Sun, Dec 4, 2011 at 8:06 AM, Shay Banon [kimchy@gmail.com](mailto:kimchy@gmail.com) wrote:

> No, you can't register a percolate query against all indices..., it has to  
> be on a specific index.
> 
> On Thu, Dec 1, 2011 at 5:33 PM, Aurélien [aurelien.dehay@gmail.com](mailto:aurelien.dehay@gmail.com) wrote:
> 
> > Hello.
> > 
> > I'm using ES in REST to index same type of document over multiples  
> > indexes, and I was planning to use percolate to permit users to write  
> > rules. Those rules may be restricted to a single index, but may be for  
> > all the documents of a type on all indexes.
> > 
> > I'd like to know if there's a way to use register and percolate  
> > queries on all the indexes or to percolate a resultset from a query, I  
> > did not find anything like this on documentation nor mailing list. API  
> > shows examples for percolating on one single index.
> > 
> > Thanks
> > 
> > Aurélien.

---

<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, 3:46am UTC](https://discuss.elastic.co/t/percolate-on-all-indexes-all-doc-of-same-type/6041/4 "2017-07-06T03:46:28Z")

</div>


