Hi Otis Your suggestion worked fine. Thanks kamal
On Sun, Jun 9, 2013 at 7:58 AM, Kamal Palei <palei.ka...@gmail.com> wrote: > Though the syntax looks fine, but I get all the records. As per example > given above I get all the documents, meaning filtering did not work. I am > curious to know if my indexing went fine or not. I will check and revert > back. > > > On Sun, Jun 9, 2013 at 7:21 AM, Otis Gospodnetic < > otis.gospodne...@gmail.com> wrote: > >> 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 >> > >