core icon indicating copy to clipboard operation
core copied to clipboard

Error when running Lucene query containing some datetime format

Open shaydotcms opened this issue 8 years ago • 3 comments

System is currently throwing an error in the Query tool when running a query containing the following datetime format: yyyy-MM-dd’T’HH:mm:ss Example of query:

+contentType:News +(conhost:48190c8c-42c4-46af-8d1a-0cd5db894797 conhost:SYSTEM_HOST) +News.sysPublishDate:03/05/2018T23:00:00 +languageId:1 +deleted:false +working:true

Result: image

Expected Behavior

System should process appropriate valid/invalid query Query Error should not be displayed in UI

Current Behavior

System is currently throwing an error in the Query tool when running a query containing the following datetime format: yyyy-MM-dd’T’HH:mm:ss

Steps to Reproduce (for bugs)

  1. Login to Dotcms
  2. Navigate to Dev Tools> Query Tool
  3. Run following query:
+contentType:News +(conhost:48190c8c-42c4-46af-8d1a-0cd5db894797 conhost:SYSTEM_HOST) +News.sysPublishDate:03/05/2018T23:00:00 +languageId:1 +deleted:false +working:true
  1. You will get an error in the UI

Your Environment

  • dotCMS version used: master branch
  • Database and version: Postgres 9.6.6
  • Operating System and version: Mac OS 10.10.5
  • Browser Name and version: Firefox v58.0
  • Application Server and version: Tomcat 8
  • Java Brand and version: Java 8

shaydotcms avatar Mar 07 '18 18:03 shaydotcms

PR Core: https://github.com/dotCMS/core/pull/13818

nollymar avatar Mar 08 '18 19:03 nollymar

The supported datetime formats are: MM/dd/yyyy HH:mm:ss and yyyyMMddHHmmss Internally, dates are converted according to the lucene pattern: yyyy-MM-dd'T'HH:mm:ss

nollymar avatar Mar 08 '18 19:03 nollymar

Passed QA. Supported datetime formats MM/dd/yyyy HH:mm:ss and yyyyMMddHHmmss show results as expected.

Tested on master branch. Mac OS 10.10 / Postgres 9.6.6 / Chrome v64.0.3282.167 / Tomcat 8 / Java 8.6

shaydotcms avatar Mar 12 '18 15:03 shaydotcms