[GeoNetwork-devel] [GeoNetwork opensource Developer website] #444: CSW filters don't match Dublin Core identifiers

#444: CSW filters don't match Dublin Core identifiers
----------------------------+-----------------------------------------------
Reporter: rcoup | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.7.0
Component: Catalog server | Version: v2.6.3
Keywords: |
----------------------------+-----------------------------------------------
Dublin core records aren't retrievable via CSW `GetRecords` queries using
a filter on the `dc:identifier` element.

  1. add a record (via template, upload, or CSW Transaction). See example
attachment.
  2. head to http://localhost:8080/geonetwork/srv/en/test.csw and paste in
the following query. Notice how you get 0 results.
   {{{
<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">
     <csw:Query typeNames="csw:Record">
         <csw:Constraint version="1.1.0">
             <Filter xmlns="http://www.opengis.net/ogc&quot;&gt;
                 <PropertyIsEqualTo>
                     <PropertyName>dc:identifier</PropertyName>
                     <Literal>12345678-1234-1234-abcd-
12345678901a</Literal>
                 </PropertyIsEqualTo>
             </Filter>
         </csw:Constraint>
     </csw:Query>
</csw:GetRecords>
}}}
  3. Change the query to the following. Notice how you get 1 result, so the
record is definitely there.
   {{{
<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">
     <csw:Query typeNames="csw:Record">
         <csw:Constraint version="1.1.0">
             <Filter xmlns="http://www.opengis.net/ogc&quot;&gt;
                 <PropertyIsLike wildCard="*" escape="\" singleChar="?">
                     <PropertyName>dc:title</PropertyName>
                     <Literal>*Test*</Literal>
                 </PropertyIsLike>
             </Filter>
         </csw:Constraint>
     </csw:Query>
</csw:GetRecords>
}}}

  * Using `identifier`, `apiso:identifier`, `dc:identifier`, `Id`, etc as
the `PropertyName` doesn't make any difference.
  * ISO19139 records are returned (using a `PropertyName` of either
`apiso:identifier`, `dc:identifier`, or `identifier`), it appears to be
only Dublin Core records that are affected.
  * the `dc:identifier` is in the metadata DB table as the `uuid` for the
record.
  * using other filters (eg. `PropertyIsLike`) on the `dc:identifier`
element doesn't work either.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/444&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#444: CSW filters don't match Dublin Core identifiers
----------------------------+-----------------------------------------------
Reporter: rcoup | Owner: geonetwork-devel@…
     Type: defect | Status: new
Priority: major | Milestone: v2.7.0
Component: Catalog server | Version: v2.6.3
Keywords: |
----------------------------+-----------------------------------------------

Comment(by rfw):

This appears to be due to the `Identifier` field being mapped to `fileID`,
a field that is only present in ISO19139 records and not Dublin Core -- in
Dublin Core, the field is stored as `identifier` in the database.

However, the `_uuid` field is available for both Dublin Core and ISO19139
and contains the correct value for both formats. I'm not sure if it is
intended to work that way, but I have attached a patch regardless for
`config-csw.xml` to change the mapping.

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/444#comment:1&gt;
GeoNetwork opensource Developer website <http://sourceforge.net/projects/geonetwork/&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.