Home
My Page
Projects
deegree

[#2487] CSW SearchResults "numberOfRecordsReturned" is sometimes incorrect

Date:
2011-05-17 15:12
Priority:
3
State:
Open
Submitted by:
Damiano Albani (dalbani)
Assigned to:
Nobody (None)
Hardware:
None
Operating System:
None
Version:
None
Severity:
None
Resolution:
None
 
URL:
Component:
CSW
 
Summary:
CSW SearchResults "numberOfRecordsReturned" is sometimes incorrect

Detailed description
If you make GetRecords request to deegree with a "startPosition" bigger than the total number of records in the store, the "numberOfRecordsReturned" in the response is a negative number.



Let's say you have a store with a single record. You send this request:



<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"; xmlns="http://www.opengis.net/cat/csw/2.0.2"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; service="CSW" version="2.0.2" maxRecords="5" startPosition="1000" resultType="results" outputFormat="application/xml" outputSchema="http://www.opengis.net/cat/csw/2.0.2"; xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd";>

<csw:Query typeNames="csw:Record">

<csw:ElementSetName typeNames="csw:Record">full</csw:ElementSetName>

</csw:Query>

</csw:GetRecords>



The response is:



<csw:GetRecordsResponse xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd http://www.isotc211.org/2005/gmd http://schemas.opengis.net/iso/19139/20070417/gmd/gmd.xsd"; xmlns:csw="http://www.opengis.net/cat/csw/2.0.2"; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>

<csw:SearchStatus timestamp="2011-05-17T15:10:20.225Z"></csw:SearchStatus>

<csw:SearchResults elementSet="full" recordSchema="http://www.opengis.net/cat/csw/2.0.2"; numberOfRecordsMatched="0" numberOfRecordsReturned="-999" nextRecord="0" expires="2011-05-17T15:10:20.230Z"></csw:SearchResults>

</csw:GetRecordsResponse>



See that numberOfRecordsReturned="-999", which is obviously incorrect/invalid.



Tested with deegree 3.0.3.

Followup

Message
Date: 2011-10-14 13:25
Sender: Damiano Albani

Bug should be closed, works fine in 3.1.
Date: 2011-05-26 08:30
Sender: Andreas Poth

This is fixed in deegree 3.1

Attached Files:

Changes:

Field Old Value Date By
summaryCSW SearchResults "numberOfRecordsReturned" is sometimes incorrect2011-05-26 08:30apoth

This site is hosted by Intevation GmbH