# Can't get filters and queries working with Percolate

**URL:** <https://discuss.elastic.co/t/cant-get-filters-and-queries-working-with-percolate/12751>\
**Category:** Elasticsearch\
**Created:** [July 10, 2013, 9:45pm UTC](https://discuss.elastic.co/t/cant-get-filters-and-queries-working-with-percolate/12751 "2013-07-10T21:45:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ron\_Pastore](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@Ron\_Pastore](https://discuss.elastic.co/u/Ron_Pastore)\
**Post date:** [July 10, 2013, 9:45pm UTC](https://discuss.elastic.co/t/cant-get-filters-and-queries-working-with-percolate/12751/1 "2013-07-10T21:45:13Z")

</div>

Hi All,  
I'm having some trouble getting percolate with filters and queries working.  
I saw this post[http://elasticsearch-users.115913.n3.nabble.com/percolate-accepts-a-query-not-a-filter-td4013609.html](http://elasticsearch-users.115913.n3.nabble.com/percolate-accepts-a-query-not-a-filter-td4013609.html)where kimchy recommends using "constant score query" but still no luck.  
Does anyone have any ideas as to what I may be doing wrong? Here is my  
gist [https://gist.github.com/ronpastore/5970509](https://gist.github.com/ronpastore/5970509). Thanks for any help!

Also, im on ElasticSearch Version: 0.19.10.

--  
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:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [July 11, 2013, 7:00am UTC](https://discuss.elastic.co/t/cant-get-filters-and-queries-working-with-percolate/12751/2 "2013-07-11T07:00:34Z")

</div>

Hey,

try wrapping your constant\_score query inside of a "query" object

--Alex

On Wed, Jul 10, 2013 at 11:45 PM, Ron Pastore [vacorama@gmail.com](mailto:vacorama@gmail.com) wrote:

> Hi All,  
> I'm having some trouble getting percolate with filters and queries  
> working. I saw this post[http://elasticsearch-users.115913.n3.nabble.com/percolate-accepts-a-query-not-a-filter-td4013609.html](http://elasticsearch-users.115913.n3.nabble.com/percolate-accepts-a-query-not-a-filter-td4013609.html)where kimchy recommends using "constant score query" but still no luck.  
> Does anyone have any ideas as to what I may be doing wrong? Here is my  
> gist [https://gist.github.com/ronpastore/5970509](https://gist.github.com/ronpastore/5970509). Thanks for any help!
> 
> Also, im on Elasticsearch Version: 0.19.10.
> 
> --  
> 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).

--  
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:** ![Ron\_Pastore](https://avatars.discourse-cdn.com/v4/letter/r/94ad74/32.png) [@Ron\_Pastore](https://discuss.elastic.co/u/Ron_Pastore)\
**Post date:** [July 11, 2013, 2:32pm UTC](https://discuss.elastic.co/t/cant-get-filters-and-queries-working-with-percolate/12751/3 "2013-07-11T14:32:33Z")

</div>

that did it! Alex, thanks so much. I'll update the gist with the query  
wrap.

On Thursday, July 11, 2013 3:00:34 AM UTC-4, Alexander Reelsen wrote:

> Hey,
> 
> try wrapping your constant\_score query inside of a "query" object
> 
> --Alex
> 
> On Wed, Jul 10, 2013 at 11:45 PM, Ron Pastore \<[vaco...@gmail.com](mailto:vaco...@gmail.com)\<javascript:\>
> 
> > wrote:
> 
> > Hi All,  
> > I'm having some trouble getting percolate with filters and queries  
> > working. I saw this post[http://elasticsearch-users.115913.n3.nabble.com/percolate-accepts-a-query-not-a-filter-td4013609.html](http://elasticsearch-users.115913.n3.nabble.com/percolate-accepts-a-query-not-a-filter-td4013609.html)where kimchy recommends using "constant score query" but still no luck.  
> > Does anyone have any ideas as to what I may be doing wrong? Here is my  
> > gist [https://gist.github.com/ronpastore/5970509](https://gist.github.com/ronpastore/5970509). Thanks for any help!
> > 
> > Also, im on Elasticsearch Version: 0.19.10.
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > For more options, visit [https://groups.google.com/groups/opt\_out](https://groups.google.com/groups/opt_out).

--  
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:26am UTC](https://discuss.elastic.co/t/cant-get-filters-and-queries-working-with-percolate/12751/4 "2017-07-06T02:26:59Z")

</div>


