lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: Solr partial date range search
Date Tue, 26 Jan 2016 01:49:27 GMT
On 1/25/2016 5:59 PM, vsriram30 wrote:
> I am using solr 4.6.1. I have a date field (TrieDateField) in my schema and
> I am trying to perform partial date range search as given in
> Query = date_field:[2016-01-11 TO NOW]
> But I am getting,
> "error": {
>     "msg": "Invalid Date String:'2016-01-11'",
>     "code": 400
>   }
> If I use full UTC date, it works good. So is the partial date range search
> feature introduced in versions greater than 4.6.1?

If you want to use a partial date string, you cannot use TrieDateField.

You will need to upgrade to at least version 5.0, and use the
|DateRangeField|type instead.  This schema change will require a
reindex.  When TrieDateField is used, it will only accept the full
date/time specification.  The documentation page does not make this very
clear.  I will try to remember to update it.

The Reference Guide does not mention that version 5.x is required for
DateRangeField, because it is not a historical document -- it only
applies to a specific version.  When a new minor version of Solr is
released, the full reference guide is issued with the same version
number as the Solr release.


View raw message