core-geonetwork
core-geonetwork copied to clipboard
Search results / Download / Number of records exported greater than search results number
Description Number of downloaded metadata records doesn't match the number of selected records which have been chosen for download.
To Reproduce Steps to reproduce the behavior:
- Filter metadata records using multiple categories, for example "Type of resources", "Provided By" and "Contact for the resource"
- Select all records
- Note number of selected records
- Export as ZIP-file
- Extract only metadata.xml records from ZIP-file
- Compare number of selected and downloaded records
Expected behavior Number of selected and downloaded records should be the same.
Desktop
- Browser Mozilla Firefox
- GeoNetwork Version 3.4.4.0
- Server Application Tomcat 7 with Java 8]
Number of selected and downloaded records should be the same.
In fact by default MEF export also export related records. See https://github.com/geonetwork/core-geonetwork/blob/master/services/src/main/java/org/fao/geonet/services/mef/Export.java#L75-L78 That may explain why you have more records than in the selection.
Hello,
thanks again for very nice support!
I manage to reproduce it. Related metadata records were exported.
If I understood well we can configure this in Geonetwork (standard=true) without touching the source code?
In my opinion the ticket can be closed.
Parameter to avoid export related records is relation=false
.
El jue., 26 sept. 2019 15:10, DeordD [email protected] escribió:
Hello,
thanks again for very nice support!
I manage to reproduce it. Related metadata records were exported.
If I understood well we can configure this in Geonetwork (standard=true) without touching the source code?
In my opinion the ticket can be closed.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/geonetwork/core-geonetwork/issues/4065?email_source=notifications&email_token=AAGJ4KHUWOJ23SMLEH5JJXDQLSYEHA5CNFSM4I2ZJ2M2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7VQCBQ#issuecomment-535494918, or mute the thread https://github.com/notifications/unsubscribe-auth/AAGJ4KGZCCALP3LTCX7DJMTQLSYEHANCNFSM4I2ZJ2MQ .
@juanluisrp Thanks a lot for the information.
Solution:
- Select metadata for download
- In the same browser tab download metadata records using
/geonetwork/srv/ger/mef.export?version=2&format=full&bucket=s101&relation=false
Only selected metadata were exported.
Ticket can be closed.
This should be added to the documentation- could you add an issue in https://github.com/geonetwork/doc/ that refers back to this issue please?
This should be added to the documentation- could you add an issue in https://github.com/geonetwork/doc/ that refers back to this issue please?
Maybe this should (only ?) be part of the API doc (and currently the mef.export
service is not migrated to Swagger API doc - maybe something to do) ?
For any users interested in solution for this problem without need to change MEF-Export request in Browser:
- Filter metadata records using multiple categories, for example "Type of resources", "Provided By" and "Contact for the resource"
- Choose "All" from dropdown menu (number of selected record is shown)
- using "selected" filter choose "Selection only"
- Click on "Export ZIP"
There is no need to configure anything in frontend or backend.