Percolate accepts a query not a filter?


(jschelle-2) #1

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/query-dsl/filtered-query.html

Thanks.


(Shay Banon) #2

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.comwrote:

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/query-dsl/filtered-query.html

Thanks.


(system) #3