core-geonetwork icon indicating copy to clipboard operation
core-geonetwork copied to clipboard

Search results / Download / Number of records exported greater than search results number

Open ghost opened this issue 5 years ago • 8 comments

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:

  1. Filter metadata records using multiple categories, for example "Type of resources", "Provided By" and "Contact for the resource"
  2. Select all records
  3. Note number of selected records
  4. Export as ZIP-file
  5. Extract only metadata.xml records from ZIP-file
  6. 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]

ghost avatar Sep 26 '19 12:09 ghost

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.

fxprunayre avatar Sep 26 '19 12:09 fxprunayre

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.

ghost avatar Sep 26 '19 13:09 ghost

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 avatar Sep 26 '19 19:09 juanluisrp

@juanluisrp Thanks a lot for the information.

ghost avatar Sep 27 '19 05:09 ghost

Solution:

  1. Select metadata for download
  2. 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.

ghost avatar Sep 27 '19 11:09 ghost

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?

archaeogeek avatar Sep 27 '19 11:09 archaeogeek

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) ?

fxprunayre avatar Sep 30 '19 10:09 fxprunayre

For any users interested in solution for this problem without need to change MEF-Export request in Browser:

  1. Filter metadata records using multiple categories, for example "Type of resources", "Provided By" and "Contact for the resource"
  2. Choose "All" from dropdown menu (number of selected record is shown)
  3. using "selected" filter choose "Selection only"
  4. Click on "Export ZIP"

There is no need to configure anything in frontend or backend.

ghost avatar Jul 03 '20 15:07 ghost