lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antelmo Aguilar <>
Subject Re: Date Query Using Local Params
Date Mon, 10 Sep 2018 19:59:51 GMT
Hi Shawn,

Thank you.  So just to confirm, there is no way for me to use an OR
operator with also using the "within" op parameter described in the bottom
of this page?

I appreciate your resposne.


On Mon, Sep 10, 2018 at 3:51 PM, Shawn Heisey <> wrote:

> On 9/10/2018 1:21 PM, Antelmo Aguilar wrote:
>> Hi,
>> I have a question.  I am trying to use the "within" op parameter in a Date
>> Search.  This works like I would expect: {!field f=collection_date_range
>> op=Within}[2013-07-08 TO 2013-07-09]
>> I would like to use an OR with the query though, something like this:
>> {!field
>> f=collection_date_range op=Within}[2013-07-08 TO 2013-07-09] OR {!field
>> f=collection_date_range op=Within}[2013-07-21 TO 2013-07-25]
>> However, I tried different approaches and none of them worked.  Is there a
>> way of doing something like this for querying dates using the "within" op
>> parameter?
> I don't think the field parser can do this.  Also, usually it's not
> possible to use localparams in a second query clause like that --
> localparams must almost always be the very first thing in the "q"
> parameter, or they will not be interpreted as localparams.  Use the
> standard (lucene) parser without localparams.  The q parameter should look
> like this:
> collection_date_range:[2013-07-08 TO 2013-07-09] OR
> collection_date_range:[2013-07-21 TO 2013-07-25]
> If the default operator hasn't been changed (which would mean it is using
> OR), then you could remove the "OR" from that.
> Thanks,
> Shawn

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