Opened 13 years ago

Closed 13 years ago

#601 closed defect (fixed)

CSW startPosition + maxRecords does not work (Simple fix)

Reported by: jesseeichar Owned by: josegar74
Priority: major Milestone: v2.6.5
Component: General Version: v2.6.3
Keywords: Cc:

Description

Doing a CSW request of the type: results_with_summary if the startPosition is not == 1 the wrong result is returned. Here are some requests and results:

Request (works correctly):

<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" service="CSW" version="2.0.2" startPosition="1" maxRecords="10" resultType="results_with_summary">
    <csw:Query typeNames="csw:Record">
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"/>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

Response: (It is correct)

<csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">
  <csw:SearchStatus timestamp="2011-09-06T10:49:50" />
  <geonet:Summary xmlns:geonet="http://www.fao.org/geonetwork" count="3456" type="local" hitsusedforsummary="1000">
    [snip...]
  </geonet:Summary>
  <csw:SearchResults numberOfRecordsMatched="3456" numberOfRecordsReturned="10" elementSet="summary" nextRecord="11">
    [snip...]
  </csw:SearchResults>
</csw:GetRecordsResponse>

Request with startPosition == 11:

<?xml version="1.0"?>
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" service="CSW" version="2.0.2" resultType="results_with_summary" startPosition="11" maxRecords="10" >
    <csw:Query typeNames="csw:Record">
        <csw:Constraint version="1.1.0">
            <Filter xmlns="http://www.opengis.net/ogc" xmlns:gml="http://www.opengis.net/gml"/>
        </csw:Constraint>
    </csw:Query>
</csw:GetRecords>

Response (incorrect because no records are returned):

<?xml version="1.0" encoding="UTF-8"?> <csw:GetRecordsResponse xmlns:csw="http://www.opengis.net/cat/csw/2.0.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/cat/csw/2.0.2 http://schemas.opengis.net/csw/2.0.2/CSW-discovery.xsd">

<csw:SearchStatus timestamp="2011-09-06T10:51:54" /> <geonet:Summary xmlns:geonet="http://www.fao.org/geonetwork" count="3456" type="local" hitsusedforsummary="1000">

[snip...]

</geonet:Summary> <csw:SearchResults numberOfRecordsMatched="3456" numberOfRecordsReturned="0" elementSet="summary" nextRecord="11" />

</csw:GetRecordsResponse>

Fix is attached

Attachments (1)

601_results_with_summary_incorrect_startIndex_handling.patch (685 bytes ) - added by jesseeichar 13 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by josegar74, 13 years ago

Owner: changed from geonetwork-devel@… to josegar74
Status: newassigned

comment:2 by josegar74, 13 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.