You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Ranveer Kumar <ra...@gmail.com> on 2011/08/24 09:24:38 UTC
not equals query in solr
Hi All,
How to do negative query in solr. Following are the criteria :
I have state and city field where I want to filter only those state and city
which is not blank. something like: state NOT "" AND city NOT "".
I tried -state:"" but its not working.
Or suggest me to do this in better way..
regards
Ranveer
Re: not equals query in solr
Posted by simon <mt...@gmail.com>.
http://wiki.apache.org/solr/SolrQuerySyntax has answers for you.
-Simon
On Thu, Aug 25, 2011 at 1:04 AM, Ranveer Kumar <ra...@gmail.com>wrote:
> any help...
>
> On Wed, Aug 24, 2011 at 12:58 PM, Ranveer Kumar <ranveer.solr@gmail.com
> >wrote:
>
> > Hi,
> >
> > is it right way to do :
> > q=(state:[* TO *] AND city:[* TO *])
> >
> > regards
> > Ranveer
> >
> >
> > On Wed, Aug 24, 2011 at 12:54 PM, Ranveer Kumar <ranveer.solr@gmail.com
> >wrote:
> >
> >> Hi All,
> >>
> >> How to do negative query in solr. Following are the criteria :
> >> I have state and city field where I want to filter only those state and
> >> city which is not blank. something like: state NOT "" AND city NOT "".
> >> I tried -state:"" but its not working.
> >>
> >> Or suggest me to do this in better way..
> >>
> >> regards
> >> Ranveer
> >>
> >>
> >>
> >>
> >
>
Re: not equals query in solr
Posted by Ranveer Kumar <ra...@gmail.com>.
any help...
On Wed, Aug 24, 2011 at 12:58 PM, Ranveer Kumar <ra...@gmail.com>wrote:
> Hi,
>
> is it right way to do :
> q=(state:[* TO *] AND city:[* TO *])
>
> regards
> Ranveer
>
>
> On Wed, Aug 24, 2011 at 12:54 PM, Ranveer Kumar <ra...@gmail.com>wrote:
>
>> Hi All,
>>
>> How to do negative query in solr. Following are the criteria :
>> I have state and city field where I want to filter only those state and
>> city which is not blank. something like: state NOT "" AND city NOT "".
>> I tried -state:"" but its not working.
>>
>> Or suggest me to do this in better way..
>>
>> regards
>> Ranveer
>>
>>
>>
>>
>
Re: not equals query in solr
Posted by Ranveer Kumar <ra...@gmail.com>.
Hi,
is it right way to do :
q=(state:[* TO *] AND city:[* TO *])
regards
Ranveer
On Wed, Aug 24, 2011 at 12:54 PM, Ranveer Kumar <ra...@gmail.com>wrote:
> Hi All,
>
> How to do negative query in solr. Following are the criteria :
> I have state and city field where I want to filter only those state and
> city which is not blank. something like: state NOT "" AND city NOT "".
> I tried -state:"" but its not working.
>
> Or suggest me to do this in better way..
>
> regards
> Ranveer
>
>
>
>