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
> https://cwiki.apache.org/confluence/display/solr/Working+with+Dates 
> 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.

Thanks,
Shawn

Reply via email to