dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
820 stars 462 forks source link

Using lower-case "to" in Lucene date range query gives inconsistent results #18447

Closed john-thomas-dotcms closed 1 year ago

john-thomas-dotcms commented 4 years ago

Describe the bug

A clear and concise description of what the bug is.

Steps to reproduce the behavior:

Run the following two queries on demo or the starter site:

  1. +contentType:Activity +modDate:[20190101000000 to 20191231000000]
  2. +contentType:Activity +modDate:[20190201000000 to 20191231000000]

Note - the only difference between these queries is the fifth digit (second digit of the month) in the first date in the range - it's 1 in the the first query and 2 in the second query.

Result: The first query returns 9 results, but the second query returns no results.

Expected behavior

The result of a query using a lowercase to should be consistent. This means it should do either of the following:

  1. Always fail, or
  2. Work the same as using an uppercase TO.

Screenshots

Results of query #1: image

Results of query #2: image

Desktop (please complete the following information):

Additional context

There's an easy workaround for this (just change the to to uppercase TO), so this isn't a high priority.

But I'm submitting it both to document that it's a known issue, and because there might be a very simple fix to prevent customers from running in to this problem (just uppercase the to) which we could consider making the next time we're in this code.

Acceptance Criteria

  1. Match the design
  2. Work in all the supported browsers (don't forget IE11 and iPad)
  3. Multilanguage
  4. Unit test
stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.