About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


Warning: This page has not been updated in over over a year and may be outdated or deprecated.
indexing:dspace

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
indexing:dspace [2017/04/21 11:55] – [2. Import records into VuFind using OAI-PMH harvest] demiankatzindexing:dspace [2020/09/21 13:53] demiankatz
Line 1: Line 1:
 ====== How to index DSpace with VuFind ====== ====== How to index DSpace with VuFind ======
  
-These are the instructions used by the Naval Postgraduate School in Monterey, California to index DSpace records in VuFind.+===== 1. Make sure OAI-PMH is turned on in DSpace =====
  
-:!: ** These instructions were written for VuFind 2.x or newer; See [[legacy:indexing:dspace|this page]] for VuFind 1.x ** +In newer versions of DSpace, OAI-PMH should be enabled by default; however, in DSpace 3.x and earlier, some [[indexing:dspace:enable_oai|additional configuration]] was needed.
- +
-===== 1. Turn on OAI-PMH in DSpace ===== +
- +
-OAI must be enabled on the DSpace repository first: +
-  - Modify the DSpace server config in **nginx.conf** on the DSpace server:<code>Location /oai/ { +
-    Proxy_set_header X-Forwarded-Host $host; +
-    Proxy_set_header X-Forwarded-Server $host; +
-    Proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; +
-    +
-    Proxy_pass http://yourdspacehostname:8080/oai/; +
-    Proxy_redirect http://yourdspacehostname:8080/oai/  http://yourdspacehostname/oai; +
- +
-    Proxy_buffering off; +
-    Proxy_store off; +
- +
-    Proxy_connect_timeout 120; +
-    Proxy_send_timeout 120; +
-    Proxy_read_timeout 120; +
-+
-</code> Comparable configuration in Apache makes use of [[http://httpd.apache.org/docs/2.2/mod/mod_proxy.html|mod_proxy]]. Note that the proxy configuration is only necessary if you are unable to open port 8080 to your VuFind instance. If you are not limited by such restrictions, feel free to use your full DSpace hostname appended with ":8080" and skip the above proxy configuration. +
-  - Modify the **server.xml** for the appropriate DSpace Tomcat instance in the **HOST** block:<code><Context path="/oai" docBase="/path_to_dspace/webapps/oai" debug="0" +
-    Reloadable="true" cachingAllowed="false" +
-    allowLinking="true" /></code> +
-  - Modify the **dspace.conf** config file for the appropriate DSpace instance:<code>... +
-harvest.includerestricted.oai = true +
-harvester.autoStart = true +
-...</code>+
  
 ===== 2. Import records into VuFind using OAI-PMH harvest ===== ===== 2. Import records into VuFind using OAI-PMH harvest =====
Line 51: Line 24:
 ./batch-import-xsl.sh DSpace dspace.properties</code> ./batch-import-xsl.sh DSpace dspace.properties</code>
  
 +==== Troubleshooting ====
 +
 +If you receive an error message during harvesting, you may need to rebuild the OAI indexes on your DSpace server. Log into that system and run these commands:
 +
 +<code>
 +<path to dspace directory>/bin/dspace oai clean-cache
 +<path to dspace directory>/bin/dspace oai import -c
 +</code>
 +
 +After that processing completes, retry the harvest process on the VuFind server as described above.
 +
 +===== 3. Customize Import Rules (optional) =====
 +
 +If you wish to customize the way your records are ingested, see the [[indexing:xml|indexing XML]] page for details. The instructions above use the example [[https://github.com/vufind-org/vufind/blob/dev/import/dspace.properties|dspace.properties]] and [[https://github.com/vufind-org/vufind/blob/dev/import/xsl/dspace.xsl|dspace.xsl]] files that ship with VuFind. You can modify these as needed to change the way data is indexed.
 +
 +:!: If you change import rules, note that you will need to remove your $VUFIND_LOCAL_DIR/harvest/DSpace directory, re-harvest the records, and repeat the indexing process in step 2 above.
 +
 +===== 4. Customize Record Display (optional) =====
 +
 +By default, VuFind does not include any DSpace-specific display logic; records indexed from DSpace are displayed using the standard "SolrDefault" record driver and templates. However, the default import setup marks DSpace records with a record_format value of "dspace" which means that you can create a custom record driver named SolrDspace in order to create custom DSpace-only display options. See [[development:howtos:displaying_a_custom_field|displaying a custom field]] for some examples of record display customization.
 ---- struct data ---- ---- struct data ----
 ---- ----
  
indexing/dspace.txt · Last modified: 2023/08/16 19:52 by demiankatz