Details
-
Bug
-
Status: Closed
-
Resolution: Fixed
-
7.0.X, Master
-
7.0.x
-
Committed
-
1
-
3
Description
7.0.x - Important Change Notes
7.0.x backport of LPS-78857, LPS-79348, LPS-80931 together requires new version of Liferay Connector to Elasticsearch 6 (1.0.1+) and Liferay Solr 5 Search Engine (1.1.1+) apps to be installed.
See also https://help.liferay.com/hc/en-us/articles/360022577331.
The DateRangeTermFilter provides API to specify the date format of the lowerBound and upperBound dates. But, it does not actually work.
Steps to Reproduce
- Navigate to the Control Panel → Server Administration
- Navigate to Script
- Select Groovy as the Script Type
- Copy script from attached groovy script: DateRangeTermFilter.groovy
- Replace code in the script console with the copied code
- Click Execute
Expected Results:
The executed groovy script returns search results for both date formats
Actual Results:
The executed groovy script only returns search results for the default date format
Sample Output - Actual Results
/***** Running Script: DateRangeTermFilter *****/ /*** DateRangeTermFilter: using Default Date Format - yyyyMMddHHmmss ***/ Article Found: {ddmTemplateKey=[BASIC-WEB-CONTENT], entryClassPK=[36786], groupId=[20126], publishDate=[20180515183900]...} /*** DateRangeTermFilter: using Non-Default Date Format - MMddyyyyHHmmss ***/ No Articles Found
Additional Details - Groovy Script
The script does the following:
- Create a unique Web Content with an expiration date
- Perform a search for the created WebContent using a DateRangeTermFilter with the default date format
- Date Format: yyyyMMddHHmmss
- Assert whether the created Web Content was returned and log result
- Perform a search for the created WebContent using a DateRangeTermFilter with a non-default date format
- Date Format: MMddyyyyHHmmss
- Assert whether the created Web Content was returned and log result
Attachments
Issue Links
- is a dependency of
-
LPS-79348 Web Content expiration is not consistent
- Closed