Try: ...&q=*:*&fq=-blocked_company_ids:5
Otis -- Solr & ElasticSearch Support http://sematext.com/ On Sat, Jun 8, 2013 at 9:37 PM, Kamal Palei <palei.ka...@gmail.com> wrote: > Dear All > I have a multi-valued field blocked_company_ids in index. > > You can think like > > 1. document1 , blocked_company_ids: 1, 5, 7 > 2. document2 , blocked_company_ids: 2, 6, 7 > 3. document3 , blocked_company_ids: 4, 5, 6 > > and so on ..... > > If I want to retrieve all the documents where blocked_company_id does not > contain one particular company id say 5. > > So my search result should give me only document2 as document1 and > document3 both contains 5. > > To achieve this how fq syntax looks like is it something like below > > &fq=blocked_company_ids:-5 > > I tried like above syntax, but it gives me 0 record. > > Can somebody help me with the syntax please, and point me where all syntax > details are given. > > Thanks > Kamal > Net Cloud Systems