@@ -5,7 +5,7 @@ A plugin that exposes your Solr 6.x indexes with the OAI2 protocol.
5
5
6
6
## How it works
7
7
You can use simple xslt documents to map the raw Solr XML response into the oai_dc metadata format; and any other
8
- metadata schema you may which to offer to your harvesting public. This way you can expose your index, regardless of your
8
+ metadata schema you want to offer your harvesting public. This way you can expose your index, regardless of your
9
9
solr schema. It can be used for single and multicore instances.
10
10
11
11
## Declare the request and response handlers
@@ -48,7 +48,7 @@ then the setting ought to be
48
48
49
49
<str name="oai_home">/oai</str>
50
50
51
- Alternatively, you can place a oai folder in each core as well. For example:
51
+ Alternatively, you can place an oai folder in each core as well. For example:
52
52
53
53
<str name="oai_home">/core0/oai</str>
54
54
@@ -62,9 +62,9 @@ Alternatively, you can place a oai folder in each core as well. For example:
62
62
63
63
### Non dynamic documents
64
64
The Identify, ListSets and ListMetadataPrefix verbs are
65
- xml documents you need to set manually in the oai folder:
65
+ xml documents you need to place manually in the oai folder.
66
66
67
- ### The Identify verb
67
+ #### The Identify verb
68
68
Place a suitable Identify.xml document in the -oai folder. For example:
69
69
70
70
<OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/"
@@ -98,7 +98,7 @@ Place a suitable Identify.xml document in the -oai folder. For example:
98
98
</OAI-PMH>
99
99
100
100
101
- ### The ListMetadataFormats verb
101
+ #### The ListMetadataFormats verb
102
102
The ListMetadataPrefix.xml document contains your metadata schema definitions. At startup the oai4Solr plugin will look
103
103
for a 'ListMetadataPrefix.xml' document in the oai folder and use for the ListMetadataFormats response.
104
104
@@ -137,7 +137,7 @@ oai_dc.xsl, marcxml.xsl and solr.xsl
137
137
Valid OAI2 metadataPrefix parameter values will then be oai_dc, marcxml and solr. The OAI2 response will be manufactured by
138
138
applying the corresponding (cached) xslt template.
139
139
140
- ###The ListSets verb
140
+ #### The ListSets verb
141
141
ListSets are not constructed dynamically from facets. Rather, like 'ListMetadataFormats' and 'Identify' they are
142
142
declared in the file ListSets.xml. For example like:
143
143
@@ -222,19 +222,19 @@ Use this when the OAI2 handler is invoked via a parent handler or proxy which at
222
222
dynamically. For example when the client is not allowed to see certain records based on access policies.
223
223
Filter query arguments must be appended to the oai handler with a -fq key.
224
224
225
- For example, if set:
225
+ For example, if set to ` true ` :
226
226
227
227
<bool name="enable_filter_query">true</bool>
228
228
229
- Clients may then append an -fq parameter to the oai handler's query string. However this setting is intended for server side control,
230
- where you can call the oai2 service internally like so in this pseude code:
229
+ then backend clients can append a -fq parameter to the oai handler's query string. This setting is intended for server side control,
230
+ so you can call the oai2 service internally. For example like this with pseude code:
231
231
232
232
String OAI2_ARGUMENTS = capture_oai_arguments(client_request);
233
233
String QUERY_FILTER_ARGUMENTS = get_query_arguments_from_user_authorities(client_id);
234
234
HttpClient client = new HttpClient("http://localhost/solr/collection1/oai?" + OAI2_ARGUMENTS + "&qf=QUERY_FILTER_ARGUMENTS);
235
235
236
236
## Solrconfig.xml configuration in full
237
- Set the following in the solrconfig.xml document:
237
+ If needed, set the following in the solrconfig.xml document:
238
238
239
239
<config>
240
240
@@ -251,7 +251,7 @@ Set the following in the solrconfig.xml document:
251
251
-->
252
252
<str name="oai_home">/oai</str>
253
253
254
- <!-- the base url... -->
254
+ <!-- the base url. If you are begin a proxy, use the proxy domain. -->
255
255
<str name="proxyurl">http://localhost:8080/oai</str>
256
256
257
257
<!-- index name of the oai identifier used for the -identifier parameter
@@ -437,8 +437,10 @@ The end result is a package in ./oai2-plugin/target/oai2-plugin-6.x-1.0.jar ( or
437
437
You can also download the latest build from https://bamboo.socialhistoryservices.org/browse/OAI4SOLR-OAI4SOLR/latest from the artifacts tab.
438
438
439
439
## Install
440
- Place oai2-plugin-6.x-1.0.jar in the designated "lib" folder of your Solr application. Or add a symbolic link in the "lib"
441
- that points to the jar.
440
+ Place oai2-plugin-6.x-1.0.jar in the designated "lib", "contrib" folder of your Solr application. Or add a symbolic link in the "lib"
441
+ that points to the jar. For example:
442
+
443
+ <lib dir="${solr.install.dir:../../../..}/contrib/oai" />
442
444
443
445
## Runable demo
444
446
Once the project is build, a demo is available. It contains an embedded Solr Jetty server. If you start it, it will load MarcXML test records.
@@ -462,4 +464,8 @@ Start the demo with:
462
464
463
465
Then explore the test OAI2 repository with your request to it, e.g.
464
466
465
- http://localhost:8983/solr/core0/oai?verb=Identify
467
+ http://localhost:8983/solr/core0/oai?verb=Identify
468
+
469
+ ## Feature requests and contributions
470
+ If you want a particular feature, make a feature request by opening up an issue. If on top of that you
471
+ want to contribute, then please feel free to fork this project; branch off; implement the function with tests and make a pull request.
0 commit comments