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 Novin Novin <to...@gmail.com> on 2018/08/21 16:13:23 UTC

not range query in block join

Hi Guys,

I was try to do block join query with "not". I got not success, can anybody
please help me out here.

This works   q=+_query_:"{!parent which=type_s:parent}
+time_tdt:[2018-08-01T16:00:00Z
TO 2018-08-04T15:59:59Z]"
This works q=-time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]

This does not work     q=+_query_:"{!parent which=type_s:parent}
-time_tdt:[2018-08-01T16:00:00Z
TO 2018-08-04T15:59:59Z]"

Did I missed something?

Thanks in advanced.
Bests,
Novin

Re: not range query in block join

Posted by Novin Novin <to...@gmail.com>.
Thanks you very much guys for help.

On Wed, 22 Aug 2018 at 10:02 Mikhail Khludnev <mk...@apache.org> wrote:

> q={!parent which=type_s:parent}+type_s:child
> -time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]
> or
> q={!parent which=type_s:parent v=$cq}&cq=+type_s:child
> -time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]
>
> On Tue, Aug 21, 2018 at 7:13 PM Novin Novin <to...@gmail.com> wrote:
>
> > Hi Guys,
> >
> > I was try to do block join query with "not". I got not success, can
> anybody
> > please help me out here.
> >
> > This works   q=+_query_:"{!parent which=type_s:parent}
> > +time_tdt:[2018-08-01T16:00:00Z
> > TO 2018-08-04T15:59:59Z]"
> > This works q=-time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]
> >
> > This does not work     q=+_query_:"{!parent which=type_s:parent}
> > -time_tdt:[2018-08-01T16:00:00Z
> > TO 2018-08-04T15:59:59Z]"
> >
> > Did I missed something?
> >
> > Thanks in advanced.
> > Bests,
> > Novin
> >
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Re: not range query in block join

Posted by Mikhail Khludnev <mk...@apache.org>.
q={!parent which=type_s:parent}+type_s:child
-time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]
or
q={!parent which=type_s:parent v=$cq}&cq=+type_s:child
-time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]

On Tue, Aug 21, 2018 at 7:13 PM Novin Novin <to...@gmail.com> wrote:

> Hi Guys,
>
> I was try to do block join query with "not". I got not success, can anybody
> please help me out here.
>
> This works   q=+_query_:"{!parent which=type_s:parent}
> +time_tdt:[2018-08-01T16:00:00Z
> TO 2018-08-04T15:59:59Z]"
> This works q=-time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]
>
> This does not work     q=+_query_:"{!parent which=type_s:parent}
> -time_tdt:[2018-08-01T16:00:00Z
> TO 2018-08-04T15:59:59Z]"
>
> Did I missed something?
>
> Thanks in advanced.
> Bests,
> Novin
>


-- 
Sincerely yours
Mikhail Khludnev

Re: not range query in block join

Posted by Erick Erickson <er...@gmail.com>.
pure not queries are spottily supported and can work (or not)
depending on where they're used, they often need to be translated from

-some_clause
to
*:* -some_clause


Solr/Lucene do not implement pure boolean logic, which often throws
people. See: https://lucidworks.com/2011/12/28/why-not-and-or-and-not/

Best,
Erick

On Tue, Aug 21, 2018 at 9:13 AM, Novin Novin <to...@gmail.com> wrote:
> Hi Guys,
>
> I was try to do block join query with "not". I got not success, can anybody
> please help me out here.
>
> This works   q=+_query_:"{!parent which=type_s:parent}
> +time_tdt:[2018-08-01T16:00:00Z
> TO 2018-08-04T15:59:59Z]"
> This works q=-time_tdt:[2018-08-01T16:00:00Z TO 2018-08-04T15:59:59Z]
>
> This does not work     q=+_query_:"{!parent which=type_s:parent}
> -time_tdt:[2018-08-01T16:00:00Z
> TO 2018-08-04T15:59:59Z]"
>
> Did I missed something?
>
> Thanks in advanced.
> Bests,
> Novin