| Elasticsearch accepts multiple types of input type when indexing a field with type 'date':
- string containing a formatted date
- long representing milliseconds since epoch
- int representing seconds since epoch
From what I can see currently, if the corresponding entity field is not of type Date but 'long' instead, ElasticSearch schema validation will fail with the following error: Invalid value for attribute 'type'. Expected 'LONG', actual is 'DATE' I suggest the type validation be more permissive in case of 'date' fields. Unless, of course, I am missing another solution to this problem. |