Am 16.12.2017 um 19:39 schrieb Georgios Petasis: > Even if the DateRangeField field can store a range of dates, doesn't > Solr understand that I have used single timestamps?
No. It could theoretically, but sorting just isn't implemented in DateRangeField. > I have even stored the dates. > My problem is that I need to use the query formating stated in the > documentation: > https://lucene.apache.org/solr/guide/7_1/working-with-dates.html#date-range-formatting > > For example, if "financialYear" is a date range, I can do > q=financialYear:2014 and it will return everything that has a date > within 2014. If the field is date point, will it work? Yes, just query with the plain old range syntax: q=financialYear:[2014-01-01T00:00:00.000Z TO 2015-01-01T00:00:00.000Z} DateRangeField might be slightly faster for such queries, but that doesn't really matter much. I only used normal date fields yet, usually they're fast enough. As a rule of thunb, only use DateRangeField if you really need to index date ranges. -Michael