sure, the gist is here...
I have given the CURL and the query, which I am using to create a
Percolator...
Like I said above, after setting the query, when I index documents
irrelevant results returned. Filters are ignored from the Percolator
query.
On Feb 5, 4:28 pm, Shay Banon kim...@gmail.com wrote:
percolator support boolean query / filters. Gist a full recreation and we can have a look at it (Elasticsearch Platform — Find real-time answers at scale | Elastic).
On Friday, February 3, 2012 at 6:37 AM, vibin dhas wrote:
Hi,
After understanding the basic concepts of Percolator, I started adding
query as well as filter to a percolator, but it seems like, somewhere
went wrong and the percolator is considering only the query while
pulling the results and filters are getting ignored.I am not sure if Percolator supports filter along with query. Then I
tried adding those filter conditions as multiple queries and that too
failed. So, how can I achieve adding a complete search(with query and
filter) in Percolator?Below is the code snippet I am using for this. Please let me know if I
am wrong any whereBoolQueryBuilder qb = new BoolQueryBuilder();
qb.must(termQuery("field1","value"));
qb.must(termQuery("field2","value"));
client.prepareIndex("_percolator", "alert", "id1")
.setSource(XContentFactory.jsonBuilder().startObject().field("query",
qb).endObject())
.setRefresh(true).setRouting(index)
.execute().actionGet();Cheers,
- Vibin