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 Zheng Lin Edwin Yeo <ed...@gmail.com> on 2017/04/05 18:47:21 UTC

Expressing "not equals" in Block Join Parent Query

Hi,

Is there any way which we can express not equals in Block Join Parent Query?

For example, I want to find accountNo_s that is not equal to 123456

Currently, I am putting it in this way for it to work:
&fq={!parent which="contentType_s:Header"}accountNo_s:* AND !accountNo_s
:"123456"

It does not work when I put it this way:
&fq={!parent which="contentType_s:Header"}!accountNo_s :"123456"

But I don't think it is a good practice to put the additional accountNo_s:*
before that. Is there other better way which we could query this?

I'm using Solr 6.4.2


Regards,
Edwin

Re: Expressing "not equals" in Block Join Parent Query

Posted by Zheng Lin Edwin Yeo <ed...@gmail.com>.
Thanks for your reply.

Meaning there is still a need to include accountNo_s:* before we put the
"not equals" parameters?

Regards,
Edwin


On 6 April 2017 at 15:49, Mikhail Khludnev <gg...@gmail.com> wrote:

> &fq={!parent which="contentType_s:Header"}accountNo_s:* -accountNo_s
> :"123456"
>
> 05 апр. 2017 г. 21:47 пользователь "Zheng Lin Edwin Yeo" <
> edwinyeozl@gmail.com> написал:
>
> > Hi,
> >
> > Is there any way which we can express not equals in Block Join Parent
> > Query?
> >
> > For example, I want to find accountNo_s that is not equal to 123456
> >
> > Currently, I am putting it in this way for it to work:
> > &fq={!parent which="contentType_s:Header"}accountNo_s:* AND !accountNo_s
> > :"123456"
> >
> > It does not work when I put it this way:
> > &fq={!parent which="contentType_s:Header"}!accountNo_s :"123456"
> >
> > But I don't think it is a good practice to put the additional
> accountNo_s:*
> > before that. Is there other better way which we could query this?
> >
> > I'm using Solr 6.4.2
> >
> >
> > Regards,
> > Edwin
> >
>

Re: Expressing "not equals" in Block Join Parent Query

Posted by Mikhail Khludnev <gg...@gmail.com>.
&fq={!parent which="contentType_s:Header"}accountNo_s:* -accountNo_s
:"123456"

05 апр. 2017 г. 21:47 пользователь "Zheng Lin Edwin Yeo" <
edwinyeozl@gmail.com> написал:

> Hi,
>
> Is there any way which we can express not equals in Block Join Parent
> Query?
>
> For example, I want to find accountNo_s that is not equal to 123456
>
> Currently, I am putting it in this way for it to work:
> &fq={!parent which="contentType_s:Header"}accountNo_s:* AND !accountNo_s
> :"123456"
>
> It does not work when I put it this way:
> &fq={!parent which="contentType_s:Header"}!accountNo_s :"123456"
>
> But I don't think it is a good practice to put the additional accountNo_s:*
> before that. Is there other better way which we could query this?
>
> I'm using Solr 6.4.2
>
>
> Regards,
> Edwin
>