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

Metadata Import via Scopus: incorrect handling of empty search results #433

Closed
saschaszott opened this issue Feb 28, 2024 · 2 comments
Closed
Labels

Comments

@saschaszott
Copy link

saschaszott commented Feb 28, 2024

Bug Description

An empty search result which is returned from the Elsevier Scopus REST API looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<search-results xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/"
                xmlns:opensearch="http://a9.com/-/spec/opensearch/1.1/"
                xmlns:prism="http://prismstandard.org/namespaces/basic/2.0/" xmlns:atom="http://www.w3.org/2005/Atom">
    <opensearch:totalResults>0</opensearch:totalResults>
    <opensearch:startIndex>0</opensearch:startIndex>
    <opensearch:itemsPerPage>0</opensearch:itemsPerPage>
    <opensearch:Query role="request" searchTerms="a-query-without-hits" startPage="0"/>
    <link ref="self"
          href="https://api.elsevier.com/content/search/scopus?start=0&amp;count=10&amp;query=a-query-without-hits&amp;httpAccept=application%2Fxml"
          type="application/xml"/>
    <entry>
        <error>Result set was empty</error>
    </entry>
</search-results>

The implementation in ScopusImportMetadataSourceServiceImpl considers this kind of result as a not-empty result.

In consequence, this leads to this unexpected state in the UI

image

@jor4science
Copy link

jor4science commented May 14, 2024

A good idea will be to check the:
opensearch:totalResults0</opensearch:totalResults>
to handle this 0 result case.
Checking this on plain DSpace:
https://demo.dspace.org/import-external?entity=Publication&sourceId=scopus&query=a-query-without-hits
give the same error.
We have to move this ISSUE to the DSpace community

@saschaszott
Copy link
Author

There is a PR in DSpace#9375 which currently has 3 failing tests. I'll try to fix this asap. I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants