Re: exclude some documents (and category filter combination) for some queries

2014-06-17 Thread Srinivasan Ramaswamy
Yeah, I forgot to include my actual result. My "not" filter was not working at all. I got all the 3 designs back: 100, 101 and 102. I followed the syntax in the link you sent and it worked :) I tried similar syntax a few times before i posted the question, but i didn't have a "filter" clause insid

Re: exclude some documents (and category filter combination) for some queries

2014-06-17 Thread Ivan Brusic
I jumped the gun when I thought I realized the issue. You listed your expected result, but not your actual result. Are you actually using nested documents? If so, you would need to use nested queries/filters: http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/query-dsl-nested-f

Re: exclude some documents (and category filter combination) for some queries

2014-06-17 Thread Srinivasan Ramaswamy
Hi Ivan Thanks for your reply. Yeah, I do understand that currently elasticsearch returns the whole nested doc. Can you help me how can i get the negative query with multiple categories working ? Thanks Srini On Fri, Jun 13, 2014 at 10:58 AM, Ivan Brusic wrote: > Currently not possible. Elast

Re: exclude some documents (and category filter combination) for some queries

2014-06-13 Thread Ivan Brusic
Currently not possible. Elasticsearch will return all the nested documents as long as one of the nested documents satisfies the query. https://github.com/elasticsearch/elasticsearch/issues/3022 The issue is my personal #1 feature requested. Frustrating considering there has been a working impleme

Re: exclude some documents (and category filter combination) for some queries

2014-06-12 Thread Srinivasan Ramaswamy
any thoughts anyone ? On Wednesday, June 11, 2014 11:15:18 PM UTC-7, Srinivasan Ramaswamy wrote: > > I would like to exclude some documents belonging to certain category from > the results only for certain search queries. I have a ES client layer where > i am thinking of implementing this logic