lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antelmo Aguilar <aagui...@nd.edu>
Subject Reason Why Query Does Not Work
Date Tue, 18 Sep 2018 18:38:14 GMT
Hi,

I am doing some date queries and I was wondering if there is some way of
getting this query to work.

( ( !{!field f=collection_date_range op=Within v='[2000-01-01 TO
2018-09-18]'} AND !{!field f=collection_date_range op=Within v='[1960-01-01
TO 1998-09-18]'} ) AND collection_season:([1999-05 TO 1999-05]) )

I understand that I could just not do NOT queries and instead search for
1998-09-18 TO 2000-01-01, but doing NOT queries gives me more results (e.g
records that do not have collection_date_range defined).

If I remove the parenthesis enclosing the NOT queries, it works.  Without
the parenthesis the query does not return results though.  So the query
below, does work.

( !{!field f=collection_date_range op=Within v='[2000-01-01 TO
2018-09-18]'} AND !{!field f=collection_date_range op=Within v='[1960-01-01
TO 1998-09-18]'} AND collection_season:([1999-05 TO 1999-05]) )

Any insight would be appreciated.  I really do not see the reason why the
parenthesis enclosing the NOT queries would cause it to not return results.

Best,
Antelmo

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