lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ulul <>
Subject DateRangeField and Timezone
Date Thu, 20 Jul 2017 00:10:53 GMT
Hi everyone

I'm trying to query on dates with time zone taken into account. I have
the following document

{"date" : "2016-12-31T04:15:00Z", "desc" : "winter time day before" }
date being of type DateRangeField

I would like to be able to perform a query based on local date. For
instance the above date corresponds to 2016-12-30 in New York (UTC-5 in
winter) so I would expect the following query NOT to retrieve the document :

Unfortunately it does... and it's the same using filter query
describes how to use TZ in facets, why doesn't it work with simple queries ?

I'm using Solr 6.5.1

I had to add DateRangeField type myself to the collection schema. I did
it with :

curl -X POST -H 'Content-type:application/json' --data-binary '{
  "add-field-type" : {
}' http://localhost:7574/solr/date_test/schema

Thank you for your help


View raw message