Multi percolate and filtering


(Rabx88) #1

Is it possible to apply filters to limit which percolators run during a multi-percolate call with existing documents? I have several types of data and would like to only run percolators that apply to the specific type of document. I store my results in a batch, then call the multi-percolate api with references to those documents. Must I define a type filter within each percolator? The documentation seems to indicate that adding a "type" field to your percolator has some effect on whether the percolator is evaluated, but this does not seem to be the case. Any guidance would be greatly appreciated.


(Rabx88) #2

I was able to get this to work by passing a term filter rather than a type filter, which makes sense I suppose. The percolators are all one type so the type filter is not applicable. I guess I was hoping for a special property of a percolator that would ensure that it only runs on a particular type.

{"percolate" : {"index" : "twitter", "type" : "tweet", "id" : "1"}}
{"filter" : {"term" : {"priority" : "high"}}}

(system) #3