geonetwork / core-geonetwork

GeoNetwork is a catalog application to manage spatially referenced resources. It provides powerful metadata editing and search functions as well as an interactive web map viewer. It is currently used in numerous Spatial Data Infrastructure initiatives across the world.
http://geonetwork-opensource.org/
GNU General Public License v2.0
428 stars 489 forks source link

CSW GetRecords "not like" ignores constraint #595

Closed jondoig closed 9 years ago

jondoig commented 10 years ago

On our internal GeoNetwork 2.10.0, a CSW GetRecords request using a "Not Like" constraint ignores the constraint and returns all results.

This should work according to the OGC 07-006r1 spec which says (p14): attribute not like '%will_not_contain_this%'

On our public GeoNetwork 2.6.4, the same request gives an error:

http://mapdata.environment.nsw.gov.au/geonetwork/srv/en/csw?request=GetRecords&service=CSW&version=2.0.2&namespace=xmlns(csw=http://www.opengis.net/cat/csw)&resultType=results&maxRecords=5&typeNames=csw:Record&elementSetName=summary&constraintLanguage=CQL_TEXT&constraint_language_version=1.1.0&constraint=AnyText+NOT+LIKE+%27%25zip%25%27

<?xml version="1.0" encoding="UTF-8"?>

ows:ExceptionTextRaised exception while searching metadata : org.fao.geonet.csw.common.exceptions.NoApplicableCodeEx: code=NoApplicableCode, locator=null, message=Error when parsing spatial filter (version: 1.1.0):<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"> <ogc:Not /> </ogc:Filter>. Error is: java.lang.NullPointerException/ows:ExceptionText /ows:Exception /ows:ExceptionReport
Delawen commented 9 years ago

Automatic close of issue because no activity was detected on the last six months.