Date sorting and dateOptionalTime format (default one) problem

Hi,

dateOptionalTime accept both YYYYMMDD and YYYY-MM-DD format which is ok
with ISO format.
But the primer seems not internally converted to date.

I have added '"dynamic" : false' to the mapping to be sure the problem
doesn’t come from there.
The order of documents insertion doesn't change the behavior.

Thanks to try the following gist: https://gist.github.com/3018231
The sort and facet query show the problem.

Benoît

The YYYYMMDD format is not supported, the dateOptionalTime parser seems to
be too lenient and allows to parse it, but the wrong result. Need to figure
out how to force it to fail... . You can explicitly set the format yourself
to make sure it will fail.

On Fri, Jun 29, 2012 at 4:23 PM, Benoît benoit.intrw@gmail.com wrote:

Hi,

dateOptionalTime accept both YYYYMMDD and YYYY-MM-DD format which is ok
with ISO format.
But the primer seems not internally converted to date.

I have added '"dynamic" : false' to the mapping to be sure the problem
doesn’t come from there.
The order of documents insertion doesn't change the behavior.

Thanks to try the following gist: Elasticsearch: Date sorting and dateOptionalTime format (default one) problem. · GitHub
The sort and facet query show the problem.

Benoît