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
Query_String query inclusive date range is not "inclusive" #20579
Comments
I can reproduce on master with the following recreation
Only document 1 matches the query, not 2. |
However things still work if the rounding is explicit:
|
jpountz
added a commit
to jpountz/elasticsearch
that referenced
this issue
Oct 7, 2016
Elasticsearch 1.x used to implicitly round up upper bounds of queries when they were inclusive so that eg. `[2016-09-18 TO 2016-09-20]` would actually run `[2016-09-18T00:00:00.000Z TO 2016-09-20T23:59:59.999Z]` and include dates like `2016-09-20T15:32:44`. This behaviour was lost in the cleanups of elastic#8889. Closes elastic#20579
jpountz
added a commit
that referenced
this issue
Oct 7, 2016
Elasticsearch 1.x used to implicitly round up upper bounds of queries when they were inclusive so that eg. `[2016-09-18 TO 2016-09-20]` would actually run `[2016-09-18T00:00:00.000Z TO 2016-09-20T23:59:59.999Z]` and include dates like `2016-09-20T15:32:44`. This behaviour was lost in the cleanups of #8889. Closes #20579
jpountz
added a commit
that referenced
this issue
Oct 7, 2016
Elasticsearch 1.x used to implicitly round up upper bounds of queries when they were inclusive so that eg. `[2016-09-18 TO 2016-09-20]` would actually run `[2016-09-18T00:00:00.000Z TO 2016-09-20T23:59:59.999Z]` and include dates like `2016-09-20T15:32:44`. This behaviour was lost in the cleanups of #8889. Closes #20579
jpountz
added a commit
that referenced
this issue
Oct 7, 2016
Elasticsearch 1.x used to implicitly round up upper bounds of queries when they were inclusive so that eg. `[2016-09-18 TO 2016-09-20]` would actually run `[2016-09-18T00:00:00.000Z TO 2016-09-20T23:59:59.999Z]` and include dates like `2016-09-20T15:32:44`. This behaviour was lost in the cleanups of #8889. Closes #20579
jpountz
added a commit
that referenced
this issue
Oct 7, 2016
Elasticsearch 1.x used to implicitly round up upper bounds of queries when they were inclusive so that eg. `[2016-09-18 TO 2016-09-20]` would actually run `[2016-09-18T00:00:00.000Z TO 2016-09-20T23:59:59.999Z]` and include dates like `2016-09-20T15:32:44`. This behaviour was lost in the cleanups of #8889. Closes #20579
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Elasticsearch version: 2.4.0
Plugins installed: []
JVM version: Java HotSpot 64-bit Server VM (build 25.65-b01, mixed mode)
OS version: Windows 7 SP 1
Description of the problem including expected versus actual behavior:
When searching date field using query_string query and providing timestamp like:
[2016-09-13 TO 2016-09-20] the entry with timestamp field being 2016-09-20T08 is not matched - same with curly brackets i.e. {2016-09-13 TO 2016-09-20}
[2016-09-13 TO 2016-09-20T09] works (but [2016-09-13 TO 2016-09-20T08] not)
I have just migrated from 1.7.5 to 2.4.0 and in 1.7.5 above query was returning correct, in my understanding, results.
Steps to reproduce:
The text was updated successfully, but these errors were encountered: