Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2345

OpenSearch in XMLUI uses start parameter wrong

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.1, 4.2, 5.0
    • Fix Version/s: 5.0
    • Component/s: None
    • Attachments:
      2
    • Comments:
      2
    • Documentation Status:
      Not Required

      Description

      The OpenSearchResponse (com.sun.syndication.feed.module.opensearch.OpenSearchResponse) expects the start index to be: the index of the first item returned in the result. * Restrictions: An integer greater than or equal to 1. * Note: The first result is 1.

      But in DSpace the first result is shown at with parameter 0 (like this:
      http://demo.dspace.org/xmlui/open-search/discover?format=kops&query=author%3A*&start=0)

      and the second result with parameter 1 (like this:
      http://demo.dspace.org/xmlui/open-search/discover?format=kops&query=author%3A*&start=1)

      Because the OpenSearchResponse requires the start index to be >= 1, the response that the two querys above produce both say:
      <opensearch:startIndex>1</opensearch:startIndex>
      Which is not true.

      To fix this /dspace-xmlui/src/main/java/org/dspace/app/xmlui/opensearch/AbstractOpenSearchGenerator.java and /dspace-xmlui/src/main/java/org/dspace/app/xmlui/opensearch/DiscoveryOpenSearchGenerator.java have to be changed to the attached versions.

        Attachments

          Activity

            People

            Assignee:
            helix84 Ivan Masár
            Reporter:
            christian.scheible Christian Scheible
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: