Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CSW harvester ignores numberOfRecordsReturned attribute #1267

Closed
etj opened this issue Oct 20, 2015 · 2 comments
Closed

CSW harvester ignores numberOfRecordsReturned attribute #1267

etj opened this issue Oct 20, 2015 · 2 comments
Assignees

Comments

@etj
Copy link
Member

etj commented Oct 20, 2015

If the numberOfRecordsReturned is smaller than the requested maxRecords, not all records will be retrieved.

e.g.:

2015-10-20 15:55:19,081 INFO  [XYZ] - Searching on : XYZ (61..81)
2015-10-20 15:55:19,465 DEBUG [XYZ] - Sent request GET /XXX/srv/de/csw202?request=GetRecords&service=CSW&version=2.0.2&resultType=results&namespace=xmlns(csw=http://www.opengis.net/cat/csw/2.0.2),xmlns(gmd=http://www.isotc211.org/2005/gmd)&outputFormat=application/xml&outputSchema=http://www.isotc211.org/2005/gmd&startPosition=61&maxRecords=20&elementSetName=summary&constraintLanguage=CQL_TEXT&constraint_language_version=1.1.0&typeNames=gmd:MD_Metadata

2015-10-20 15:55:19,469 DEBUG [XYZ] - Search results:
<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="2015-10-20T15:55:05" />
  <csw:SearchResults numberOfRecordsMatched="825" numberOfRecordsReturned="10" elementSet="summary" nextRecord="71">
--
2015-10-20 15:55:19,483 INFO  [XYZ] - Searching on : XYZ (81..101)
2015-10-20 15:55:19,895 DEBUG [XYZ] - Sent request GET /XXX/srv/de/csw202?request=GetRecords&service=CSW&version=2.0.2&resultType=results&namespace=xmlns(csw=http://www.opengis.net/cat/csw/2.0.2),xmlns(gmd=http://www.isotc211.org/2005/gmd)&outputFormat=application/xml&outputSchema=http://www.isotc211.org/2005/gmd&startPosition=81&maxRecords=20&elementSetName=summary&constraintLanguage=CQL_TEXT&constraint_language_version=1.1.0&typeNames=gmd:MD_Metadata

2015-10-20 15:55:19,898 DEBUG [XYZ] - Search results:
<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="2015-10-20T15:55:05" />
  <csw:SearchResults numberOfRecordsMatched="825" numberOfRecordsReturned="10" elementSet="summary" nextRecord="91">
@etj etj self-assigned this Oct 20, 2015
@etj
Copy link
Member Author

etj commented Oct 20, 2015

The harvester now uses the nextRecord attribute for retrieving the next chunk of metadata, and to find out when there are no more records to be retrieved.
numberOfRecordsReturned is only used for internal checks and logging.

@etj etj closed this as completed Oct 20, 2015
@etj etj reopened this Apr 27, 2016
@etj
Copy link
Member Author

etj commented Apr 27, 2016

Also check these commits and related comments:

  • 92f8a77 (may skip records at the end)
  • 6c4b4d1 (may skip records in loop)

etj added a commit that referenced this issue Apr 27, 2016
@etj etj closed this as completed Apr 27, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant