Browse Source

make solr limit configurable in OAI plugin

pull/289/head
Alexander Bigga 5 years ago
parent
commit
00d555e503
  1. 4
      plugins/oai/class.tx_dlf_oai.php
  2. 12
      plugins/oai/flexform.xml
  3. 2
      plugins/oai/locallang.xml

4
plugins/oai/class.tx_dlf_oai.php

@ -977,6 +977,10 @@ class tx_dlf_oai extends tx_dlf_plugin {
$solr = tx_dlf_solr::getInstance($this->conf['solrcore']);
if (intval($this->conf['solr_limit']) > 0) {
$solr->limit = intval($this->conf['solr_limit']);
}
// We only care about the UID in the results and want them sorted
$parameters = array ("fl" => "uid", "sort" => "uid asc");

12
plugins/oai/flexform.xml

@ -105,6 +105,18 @@
</config>
</TCEforms>
</solrcore>
<solr_limit>
<TCEforms>
<displayCond>FIELD:pages:REQ:true</displayCond>
<exclude>1</exclude>
<label>LLL:EXT:dlf/plugins/oai/locallang.xml:tt_content.pi_flexform.solr_limit</label>
<config>
<type>input</type>
<eval>required,num,int</eval>
<default>50000</default>
</config>
</TCEforms>
</solr_limit>
<stylesheet>
<TCEforms>
<exclude>1</exclude>

2
plugins/oai/locallang.xml

@ -21,6 +21,7 @@
<label index="tt_content.pi_flexform.expired">Expiration time for resumption token (seconds)</label>
<label index="tt_content.pi_flexform.show_userdefined">Show user-defined collections?</label>
<label index="tt_content.pi_flexform.solrcore">Solr Core</label>
<label index="tt_content.pi_flexform.solr_limit">Maximum Solr results</label>
<label index="tt_content.pi_flexform.stylesheet">Transformation stylesheet</label>
<label index="tt_content.pi_flexform.unqualified_epicur">Use unqualified epicur?</label>
@ -41,6 +42,7 @@
<label index="tt_content.pi_flexform.expired">Gültigkeitsdauer des Resumption Tokens (Sekunden)</label>
<label index="tt_content.pi_flexform.show_userdefined">Benutzerdefinierte Kollektionen anzeigen?</label>
<label index="tt_content.pi_flexform.solrcore">Solr Kern</label>
<label index="tt_content.pi_flexform.solr_limit">Maximale Solr-Ergebnissen</label>
<label index="tt_content.pi_flexform.stylesheet">XSL-Stylesheet</label>
<label index="tt_content.pi_flexform.unqualified_epicur">Unqualifiziertes Epicur verwenden?</label>
<label index="badArgument">Die Anfrage enthält ungültige Parameter, es fehlen benötigte Parameter oder Parameter haben ungültige Werte.</label>

Loading…
Cancel
Save