lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Iana Bondarska <yana2...@gmail.com>
Subject Re: Range Filter for Multi-Valued Date Fields
Date Tue, 23 Aug 2016 14:15:30 GMT
Hello Mikhail,
I convert filters that come from other part of application and in general
cannot combine many filters into one , since conditions can be quite
complex.
Could you please provide more details why is this expected behavior -
(p_happyDates:[1975-10-31T00:00:00.000Z+TO+*]+AND+p_
happyDates:[*+TO+1975-10-31T23:59:59.999Z]) is  AND filter with 2
conditions date>="1975-10-31T00:00:00.000Z" and  date<="1975-10-
31T23:59:59.999Z" , seems that it should return same results that
&fq=p_happyDates:[1975-10-31T00:00:00.000Z+TO+1975-10-31T23:59:59.999Z]



2016-08-23 15:00 GMT+03:00 Mikhail Khludnev <mkhl@apache.org>:

> Hello Iana,
>
> I consider is as expected behavior, perhaps usually it's done as
> &fq=p_happyDates:[1975-10-31T00:00:00.000Z+TO+1975-10-31T23:59:59.999Z],
> which is not equivalent to combining half closed ranges with boolean query.
> I wonder why did you do like that?
>
> On Tue, Aug 23, 2016 at 2:33 PM, Iana Bondarska <yana2301@gmail.com>
> wrote:
>
> > Hi All,
> >
> > could you help me please with multiple range filters on multi valued
> > fields:
> > I have following dataset:
> > {
> > "p_happyDates":[
> > "1986-05-16T20:00:00Z",
> > "1875-04-29T21:57:56Z",
> > "1906-07-04T21:57:56Z"]
> > },
> > {
> > "p_happyDates":[
> > "1986-05-16T20:00:00Z",
> > "1975-10-31T21:57:56Z",
> > "1966-12-28T21:00:00Z"]
> > }
> > I apply filters:
> > &fq=(p_happyDates:[1975-10-31T00:00:00.000Z+TO+*]+AND+p_
> > happyDates:[*+TO+1975-10-31T23:59:59.999Z])
> > I expect to see only second record.
> > Actually I see both records. Even if I add parameter q.op=AND - result is
> > the same.
> > Is this expected behavior or known issue for multivalued fields?
> >
> > Best Regards,
> > Iana Bondarska
> >
>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message