The Gitlab instance will be restarted on Monday April 28th at 2AM. There will be a short interruption of service.

Skip to content
Snippets Groups Projects
Commit 3e516aa6 authored by Ere Maijala's avatar Ere Maijala Committed by Robert Lange
Browse files

Make OAI-PMH page size configurable

parent c3ac8bc2
No related merge requests found
......@@ -1170,6 +1170,10 @@ url = https://www.myendnoteweb.com/EndNoteWeb.html
;
; If admin_email is not set, the main email under [Site] will be used instead.
;
; page_size may be used to specify the number of records returned per request.
; Default is 100. A higher number may improve overall harvesting performance, but
; will also make a single response page larger and slower to produce.
;
; If set_field is set, the named Solr field will be used to generate sets on
; your OAI-PMH server. If it is not set, sets will not be supported.
;
......@@ -1194,6 +1198,7 @@ url = https://www.myendnoteweb.com/EndNoteWeb.html
;identifier = myuniversity.edu
;repository_name = "MyUniversity Catalog"
;admin_email = oai@myuniversity.edu
;page_size = 1000
;set_field = "format"
;set_query['eod_books'] = "institution:kfu AND publishDate:[1911 TO 1911]"
;set_query['eod_ebooks'] = "format:eBook"
......
......@@ -640,6 +640,11 @@ class Server
$this->idNamespace = $config->OAI->identifier;
}
// Override page size if configured:
if (isset($config->OAI->page_size)) {
$this->pageSize = $config->OAI->page_size;
}
// Use either OAI-specific or general email address; we must have SOMETHING.
$this->adminEmail = isset($config->OAI->admin_email) ?
$config->OAI->admin_email : $config->Site->email;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment