Opened 14 years ago
Closed 13 years ago
#447 closed defect (fixed)
CSW GetRecords returns incorrect # of results returned
Reported by: | heikki | Owned by: | heikki |
---|---|---|---|
Priority: | major | Milestone: | v2.7.0 |
Component: | General | Version: | v2.6.3 |
Keywords: | csw getrecords | Cc: |
Description
To reproduce: in a clean GN 2.6.3 installation, with no metadata;
load all templates; load sample metadata; issue 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="7" elementSet="summary" nextRecord="0">
But there are only 4 <gmd:MD_Metadata> and 1 <MD_Metadata> really returned in the response.
Possibly some of the sample metadata could not be transformed to ISO format or so, but I think the numberOfRecordsReturned attribute should reflect how many records are really returned.
Change History (2)
comment:1 by , 14 years ago
Owner: | changed from | to
---|
comment:2 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed numberOfRecordsReturned. It so happens that metadata may be found in the search, but then they cannot be retrieved to be included in the response.
Now, only metadata that can actually be retrieved is counted in numberOfRecordsReturned.
Discussed in IRC and agreed that numberOfRecordsReturned should reflect the numbers of records that are returned.
The CSW 2.0.2 spec says: Number of records actually returned to client. so this is also stronger evidence that numberOfRecordsReturned should return the number of records that are actually returned.