[GeoNetwork-users] OGC filter "PropertyIsEqualTo" behaves more like "PropertyisLike", intended?

Hello

We are running a GN 3.6.0 instance with a Postgresql 10 dbs in a Windows
server environ* and are trying to make a csw:getRecords request with a
PropertyIsEqualTo filter return only exact matches:

*<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
service="CSW" version="2.0.2" resultType="results"
startPosition="1" maxRecords="15"
outputFormat="application/xml"
outputSchema="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance&gt;&quot;
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
<http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&gt;&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt;&quot;
xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0
<http://www.opengis.net/cat/csw/apiso/1.0&gt;&quot;&gt; <csw:Query
typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName> <csw:Constraint
version="1.1.0"> <ogc:Filter><ogc:PropertyIsEqualTo>
  <ogc:PropertyName>title</ogc:PropertyName>
<ogc:Literal>Cykelvägar</ogc:Literal>
</ogc:PropertyIsEqualTo></ogc:Filter> </csw:Constraint>
<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc
<http://www.opengis.net/ogc&gt;&quot;&gt; <ogc:SortProperty>
        <ogc:PropertyName>title</ogc:PropertyName>
<ogc:SortOrder>ASCE</ogc:SortOrder> </ogc:SortProperty>
      </ogc:SortBy> </csw:Query> </csw:GetRecords*>

What this returns however is not only the metadata post with the exact
title "Cykelvägar" but rather every metadata post with titles matching
"*Cykelvägar*", of which there are three:
  *<csw:SearchResults numberOfRecordsMatched="3"
numberOfRecordsReturned="3" elementSet="full" nextRecord="0">*:

*<dc:title>Cykelvägar</dc:title>*
*<dc:title>Förslag cykelvägar (inkl. utgår) - ÖP 2030</dc:title>*
*<dc:title>Förslag cykelvägar - ÖP 2030</dc:title>*

As far as I'm aware PropertyIsLike allows wildcards and PropertyIsEqualTo
doesn't so it seems PropertyIsLike is supposed to return only exact
matches, is this correct?
If this is correct, how can we troubleshoot our current environment?

*The above request produces the same result on a default installation of GN
3.4 in a Linux environ (with the default h2 db)

Thanks for any replies /
David.

Hello David

I do not have a GeoNetwork 3.6 installlation ready to test it, but on 3.10 the following POST body works for me:

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
                xmlns:gmd="http://www.isotc211.org/2005/gmd&quot;
                service="CSW" version="2.0.2"
                resultType="results"
                outputSchema="http://www.isotc211.org/2005/gmd&quot;&gt;
  <csw:Query typeNames="gmd:MD_Metadata">
    <csw:ElementName>
      /gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title
    </csw:ElementName>
    <csw:Constraint version="1.1.0">
      <Filter xmlns="http://www.opengis.net/ogc&quot;&gt;
        <PropertyIsEqualTo>
          <PropertyName>any</PropertyName>
          <Literal>Cykelvägar</Literal>
        </PropertyIsEqualTo>
      </Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>

Best regards

Mit freundlichen Grüßen

Sven van Crombrugge

Sachgebiet 3.3 - Geoinformationssysteme, E-Government -

- Zentrale -

Von der Heydt 22 . 66115 Saarbrücken
Tel.: +49 (0) 681 9712-303 · Fax: +49 (0) 681 9712-200
S.vanCrombrugge@...1788... · www.lvgl.saarland.de

________________________________________________________________________________________________
Hinweis zum Datenschutz
Informationen über die Verarbeitung Ihrer personenbezogenen Daten gemäß Artikel 13 und Artikel 14 der
Verordnung (EU) 2016/679 (DSGVO) sind elektronisch auf unserer Internetseite abrufbar:
https://www.saarland.de/vermessung_geoinformation_landentwicklung.htm
unter der Rubrik: Hinweise zum Datenschutz
________________________________________________________________________________________________
-----Ursprüngliche Nachricht-----
Von: David Persson <perssond9@...54...>
Gesendet: Donnerstag, 16. Juli 2020 10:46
An: GeoNetwork-users@lists.sourceforge.net
Betreff: [GeoNetwork-users] OGC filter "PropertyIsEqualTo" behaves more like "PropertyisLike", intended?

Hello

We are running a GN 3.6.0 instance with a Postgresql 10 dbs in a Windows server environ* and are trying to make a csw:getRecords request with a PropertyIsEqualTo filter return only exact matches:

*<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
service="CSW" version="2.0.2" resultType="results"
startPosition="1" maxRecords="15"
outputFormat="application/xml"
outputSchema="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance&gt;&quot;
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
<http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&gt;&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt;&quot;
xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0
<http://www.opengis.net/cat/csw/apiso/1.0&gt;&quot;&gt; <csw:Query
typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName> <csw:Constraint
version="1.1.0"> <ogc:Filter><ogc:PropertyIsEqualTo>
  <ogc:PropertyName>title</ogc:PropertyName>
<ogc:Literal>Cykelvägar</ogc:Literal>
</ogc:PropertyIsEqualTo></ogc:Filter> </csw:Constraint>
<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc
<http://www.opengis.net/ogc&gt;&quot;&gt; <ogc:SortProperty>
        <ogc:PropertyName>title</ogc:PropertyName>
<ogc:SortOrder>ASCE</ogc:SortOrder> </ogc:SortProperty>
      </ogc:SortBy> </csw:Query> </csw:GetRecords*>

What this returns however is not only the metadata post with the exact title "Cykelvägar" but rather every metadata post with titles matching "*Cykelvägar*", of which there are three:
  *<csw:SearchResults numberOfRecordsMatched="3"
numberOfRecordsReturned="3" elementSet="full" nextRecord="0">*:

*<dc:title>Cykelvägar</dc:title>*
*<dc:title>Förslag cykelvägar (inkl. utgår) - ÖP 2030</dc:title>* *<dc:title>Förslag cykelvägar - ÖP 2030</dc:title>*

As far as I'm aware PropertyIsLike allows wildcards and PropertyIsEqualTo doesn't so it seems PropertyIsLike is supposed to return only exact matches, is this correct?
If this is correct, how can we troubleshoot our current environment?

*The above request produces the same result on a default installation of GN
3.4 in a Linux environ (with the default h2 db)

Thanks for any replies /
David.

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at http://sourceforge.net/projects/geonetwork

Hi,

Thanks a lot! That made a difference!
Regards,
David.

On Thu, Jul 16, 2020 at 11:28 AM van Crombrugge, Sven (LVGL) <
S.vanCrombrugge@anonymised.com> wrote:

Hello David

I do not have a GeoNetwork 3.6 installlation ready to test it, but on 3.10
the following POST body works for me:

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot;
                xmlns:gmd="http://www.isotc211.org/2005/gmd&quot;
                service="CSW" version="2.0.2"
                resultType="results"
                outputSchema="http://www.isotc211.org/2005/gmd&quot;&gt;
  <csw:Query typeNames="gmd:MD_Metadata">
    <csw:ElementName>

/gmd:MD_Metadata/gmd:identificationInfo/gmd:MD_DataIdentification/gmd:citation/gmd:CI_Citation/gmd:title
    </csw:ElementName>
    <csw:Constraint version="1.1.0">
      <Filter xmlns="http://www.opengis.net/ogc&quot;&gt;
        <PropertyIsEqualTo>
          <PropertyName>any</PropertyName>
          <Literal>Cykelvägar</Literal>
        </PropertyIsEqualTo>
      </Filter>
    </csw:Constraint>
  </csw:Query>
</csw:GetRecords>

Best regards

Mit freundlichen Grüßen

Sven van Crombrugge

Sachgebiet 3.3 - Geoinformationssysteme, E-Government -

- Zentrale -

Von der Heydt 22 . 66115 Saarbrücken
Tel.: +49 (0) 681 9712-303 · Fax: +49 (0) 681 9712-200
S.vanCrombrugge@anonymised.com · www.lvgl.saarland.de

________________________________________________________________________________________________
Hinweis zum Datenschutz
Informationen über die Verarbeitung Ihrer personenbezogenen Daten gemäß
Artikel 13 und Artikel 14 der
Verordnung (EU) 2016/679 (DSGVO) sind elektronisch auf unserer
Internetseite abrufbar:
https://www.saarland.de/vermessung_geoinformation_landentwicklung.htm
unter der Rubrik: Hinweise zum Datenschutz

________________________________________________________________________________________________
-----Ursprüngliche Nachricht-----
Von: David Persson <perssond9@anonymised.com>
Gesendet: Donnerstag, 16. Juli 2020 10:46
An: GeoNetwork-users@lists.sourceforge.net
Betreff: [GeoNetwork-users] OGC filter "PropertyIsEqualTo" behaves more
like "PropertyisLike", intended?

Hello

We are running a GN 3.6.0 instance with a Postgresql 10 dbs in a Windows
server environ* and are trying to make a csw:getRecords request with a
PropertyIsEqualTo filter return only exact matches:

*<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;&quot;
xmlns:ogc="http://www.opengis.net/ogc&quot;
service="CSW" version="2.0.2" resultType="results"
startPosition="1" maxRecords="15"
outputFormat="application/xml"
outputSchema="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;&quot;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance&gt;&quot;
xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2
<http://www.opengis.net/cat/csw/2.0.2&gt;
http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd
<http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd&gt;&quot;
xmlns:gmd="http://www.isotc211.org/2005/gmd
<http://www.isotc211.org/2005/gmd&gt;&quot;
xmlns:apiso="http://www.opengis.net/cat/csw/apiso/1.0
<http://www.opengis.net/cat/csw/apiso/1.0&gt;&quot;&gt; <csw:Query
typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName> <csw:Constraint
version="1.1.0"> <ogc:Filter><ogc:PropertyIsEqualTo>
  <ogc:PropertyName>title</ogc:PropertyName>
<ogc:Literal>Cykelvägar</ogc:Literal>
</ogc:PropertyIsEqualTo></ogc:Filter> </csw:Constraint>
<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc
<http://www.opengis.net/ogc&gt;&quot;&gt; <ogc:SortProperty>
        <ogc:PropertyName>title</ogc:PropertyName>
<ogc:SortOrder>ASCE</ogc:SortOrder> </ogc:SortProperty>
      </ogc:SortBy> </csw:Query> </csw:GetRecords*>

What this returns however is not only the metadata post with the exact
title "Cykelvägar" but rather every metadata post with titles matching
"*Cykelvägar*", of which there are three:
  *<csw:SearchResults numberOfRecordsMatched="3"
numberOfRecordsReturned="3" elementSet="full" nextRecord="0">*:

*<dc:title>Cykelvägar</dc:title>*
*<dc:title>Förslag cykelvägar (inkl. utgår) - ÖP 2030</dc:title>*
*<dc:title>Förslag cykelvägar - ÖP 2030</dc:title>*

As far as I'm aware PropertyIsLike allows wildcards and PropertyIsEqualTo
doesn't so it seems PropertyIsLike is supposed to return only exact
matches, is this correct?
If this is correct, how can we troubleshoot our current environment?

*The above request produces the same result on a default installation of GN
3.4 in a Linux environ (with the default h2 db)

Thanks for any replies /
David.

_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork