Opened 13 years ago

Last modified 12 years ago

#541 new defect

CSW GetRecords returns incorrect # of results matched

Reported by: heikki Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.8.0
Component: General Version: v2.6.4
Keywords: csw, getrecords, numberOfRecordsMatched Cc:

Description

To reproduce: in a clean GN trunk installation, with no metadata;

load all templates; load sample metadata; post this GetRecords request:

<?xml version="1.0" encoding="UTF-8"?>
<csw:GetRecords 
xmlns:gmd="http://www.isotc211.org/2005/gmd" 
xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" 
xmlns:ogc="http://www.opengis.net/ogc" 
resultType="results" 
service="CSW" version="2.0.2" outputSchema="http://www.isotc211.org/2005/gmd">
  <csw:Query typeNames="gmd:MD_Metadata" elementSet="summary">
  </csw:Query>
</csw:GetRecords>

The response says:

<csw:SearchResults numberOfRecordsMatched="7" numberOfRecordsReturned="5" elementSet="summary" nextRecord="6">

There are 5 metadata records returned in the response, which is correctly indicated by numberOfRecordsReturned. However, numberOfRecordsMatched should also be 5, not 7.

The mismatch is caused because some records could not be converted to ISO and are therefore not returned in this response, but they were counted as "matches", even though it is not possible to return them in the response to this request.

Change History (1)

comment:1 by ianwallen, 12 years ago

Milestone: v2.7.0v2.8.0
Note: See TracTickets for help on using tickets.