Open gaellafond opened 4 months ago
I figured out I can use timestamp (numerical value) for the "Modified" property. It's a good workaround, but the bug is still present. String comparison should not produce a JsonParseException.
The timestamp doesn't work with GeoNetwork 3 and GeoNetwork 4 (up to 4.2.7). A formatted date must be used in the filter. The point of using a standard API is to keep it consistent. There is nothing consistent in the implementation of the CSW API between version of GeoNetwork... It's very frustrating to use...
@gaellafond thanks for reporting the issue, indeed was introduced in https://github.com/geonetwork/core-geonetwork/issues/7527, trying to solve another issue.
I've created https://github.com/geonetwork/core-geonetwork/pull/8217, please check it
Describe the bug When doing a CSW GetRecords request with a Filter to get records modified since a given date, GeoNetwork generates an invalid JSON object for ElasticSearch.
Request example:
Response:
NOTE: The quotes around the date value are escaped. That's what is causing the exception.
The bug applies to the following CSW filters:
<PropertyIsLessThan>
<PropertyIsLessThanOrEqualTo>
<PropertyIsGreaterThan>
<PropertyIsGreaterThanOrEqualTo>
<PropertyIsLike>
<PropertyIsBetween>
Doesn't apply to the following CSW filters:
<PropertyIsEqualTo>
<PropertyIsNotEqualTo>
To Reproduce Steps to reproduce the behavior:
Expected behavior List of records in the response
Desktop (please complete the following information):
Additional context GeoNetwork is running in Docker, using the official GeoNetwork Docker image found on DockerHub.
NOTE: I believe the following issue has introduced the bug: https://github.com/geonetwork/core-geonetwork/issues/7527