New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Date Range Filter unclear rounding behavior #8490
Comments
I read the related issue and the documentation for date rounding (http://www.elasticsearch.org/guide/en/elasticsearch/reference/current/mapping-date-format.html#date-math) It appears that date rounding is to the nearest second - if this is so, and I want millisecond precision is my only option passing range values as UNIX millisecond timestamps ?
I get right results - no records match) |
Rounding only happens if you specify it, eg "some_date/d" What's happening is that the |
I think I ran a query with
and this record matched. If I try the same range filter with 1415804100146 - 1415804100149 no records match |
Hmm you may be right - I'll have to take another look at this one tomorrow |
Ping. Any updates on what the expected behavior of |
Hi @aaneja So you're correct: Do you perhaps have another field with the same name but a different mapping? Can you provide a working recreation of this issue? What version of Elasticsearch are you running? |
Here's a repro -
Then -
The last two queries should be, IMO, equivalent. |
I've tracked this down to a bug in the date parser and am working on a fix. |
Date parsing uses a flag to indicate whether the rounding should be inclusive or exclusive. This change fixes the parsing to not use this logic in the case of exact dates that do not have rounding syntax. closes elastic#8490
After discussing the further, I think the best immediate fix here is to set |
I'm closing this in favor of #8598 which will be fixed for 2.0. |
If I run the query :
I get :
eventTime has mappings :
Shouldn't no records match ?
Interestingly if I run the same query with the range filter using 'lt' instead of a 'lte' I get no records matched.
The text was updated successfully, but these errors were encountered: