[GeoNetwork-devel] Csw maxRecords behaviour interacting with resultType

Hi list,

We have observed a strange behavior in our Geonetwork 2.6.4 with csw.
It seems that the maxRecords value is treated differently depending you use resultType="results_with_summary" or resultType="results"

# resultType="results" startPosition="3" maxRecords="4"
=> numberOfRecordsReturned="4"
=> behaviour expected from the 07-006r1_OpenGIS_Catalogue_Services_Specification_V2.0.2.pdf

# resultType="results_with_summary" startPosition="3" maxRecords="4" (the rest of the query being exactly the same)
=> numberOfRecordsReturned="2"
=> maxRecords seems to be interpreted as an endPosition. Thus startPosition="3" maxRecords="2" does not work as the system starts at item n°3 but doesnot move backward to get item n°2. And startPosition="3" maxRecords="3" only return item n°3.

# a test Query
<csw:GetRecords xmlns:csw="http://www.opengis.net/cat/csw/2.0.2&quot; service="CSW" version="2.0.2" resultType="results_with_summary" startPosition="3" maxRecords="4">
<csw:Query typeNames="csw:Record">
<csw:ElementSetName>full</csw:ElementSetName>
<ogc:SortBy xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
<ogc:SortProperty>
<ogc:PropertyName>relevance</ogc:PropertyName>
<ogc:SortOrder>D</ogc:SortOrder>
</ogc:SortProperty>
</ogc:SortBy>
<csw:Constraint version="1.0.0">
<ogc:Filter xmlns:ogc="http://www.opengis.net/ogc&quot;&gt;
<ogc:And>
<ogc:PropertyIsEqualTo>
<ogc:PropertyName>AnyText</ogc:PropertyName>
<ogc:Literal>masses</ogc:Literal>
</ogc:PropertyIsEqualTo>
<ogc:Intersects>
<ogc:PropertyName>ows:BoundingBox</ogc:PropertyName>
<gml:Box xmlns:gml="http://www.opengis.net/gml&quot;&gt;
<gml:coordinates decimal="." cs="," ts=" ">-180,-90 180,90</gml:coordinates>
</gml:Box>
</ogc:Intersects>
</ogc:And>
</ogc:Filter>
</csw:Constraint>
</csw:Query>
</csw:GetRecords>

# Csw address
http://services.sandre.eaufrance.fr/geonetwork_CSW/srv/fr/csw

Best
Sylvain