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

Reply via email to