# Percolate accepts a query not a filter?

**URL:** <https://discuss.elastic.co/t/percolate-accepts-a-query-not-a-filter/7841>\
**Category:** Elasticsearch\
**Created:** [May 24, 2012, 2:05pm UTC](https://discuss.elastic.co/t/percolate-accepts-a-query-not-a-filter/7841 "2012-05-24T14:05:12Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jschelle\_2](https://avatars.discourse-cdn.com/v4/letter/j/f475e1/32.png) [@jschelle\_2](https://discuss.elastic.co/u/jschelle_2)\
**Post date:** [May 24, 2012, 2:05pm UTC](https://discuss.elastic.co/t/percolate-accepts-a-query-not-a-filter/7841/1 "2012-05-24T14:05:12Z")

</div>

According to this link, when you percolate a document (percolate only, not  
building an index) you can percolate the document against a subset of the  
registered queries. The example shows using the _query_ field but the  
commentary uses the term _filter_. After to experimenting, I found it does  
in fact take a query. @kimchy et all - Why does this take a query instead  
of a filter? I'm assuming the main difference is scoring, correct? In which  
case, is scoring necessary when percolating, since you won't see the score  
of the registered queries anyway? Since this is more of a design question,  
please let me know if there's a more appropriate forum.

[http://www.elasticsearch.org/guide/reference/api/percolate.html](http://www.elasticsearch.org/guide/reference/api/percolate.html)  
[http://www.elasticsearch.org/guide/reference/query-dsl/filtered-query.html](http://www.elasticsearch.org/guide/reference/query-dsl/filtered-query.html)

Thanks.

---

<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:** [May 25, 2012, 11:13pm UTC](https://discuss.elastic.co/t/percolate-accepts-a-query-not-a-filter/7841/2 "2012-05-25T23:13:28Z")

</div>

Its takes a query, yes, but you can easily have a filter as well, by  
wrapping it in a constant\_score query. Scoring is an importnat part of  
queries vs. filteres, but not just, queries for example, can do analysis on  
text data to build more complex queries out of them (like text and  
query\_string queries).

On Thu, May 24, 2012 at 4:05 PM, shadow000fire [jason.scheller@gmail.com](mailto:jason.scheller@gmail.com)wrote:

> According to this link, when you percolate a document (percolate only, not  
> building an index) you can percolate the document against a subset of the  
> registered queries. The example shows using the _query_ field but the  
> commentary uses the term _filter_. After to experimenting, I found it  
> does in fact take a query. @kimchy et all - Why does this take a query  
> instead of a filter? I'm assuming the main difference is scoring, correct?  
> In which case, is scoring necessary when percolating, since you won't see  
> the score of the registered queries anyway? Since this is more of a design  
> question, please let me know if there's a more appropriate forum.
> 
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/api/percolate.html)  
> [Elasticsearch Platform — Find real-time answers at scale | Elastic](http://www.elasticsearch.org/guide/reference/query-dsl/filtered-query.html)
> 
> Thanks.

---

<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:26am UTC](https://discuss.elastic.co/t/percolate-accepts-a-query-not-a-filter/7841/3 "2017-07-06T03:26:52Z")

</div>


