hydra-works 2.0.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,327 @@
1
+ <?xml version="1.0" encoding="UTF-8" ?>
2
+ <!--
3
+ Licensed to the Apache Software Foundation (ASF) under one or more
4
+ contributor license agreements. See the NOTICE file distributed with
5
+ this work for additional information regarding copyright ownership.
6
+ The ASF licenses this file to You under the Apache License, Version 2.0
7
+ (the "License"); you may not use this file except in compliance with
8
+ the License. You may obtain a copy of the License at
9
+
10
+ http://www.apache.org/licenses/LICENSE-2.0
11
+
12
+ Unless required by applicable law or agreed to in writing, software
13
+ distributed under the License is distributed on an "AS IS" BASIS,
14
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ See the License for the specific language governing permissions and
16
+ limitations under the License.
17
+ -->
18
+
19
+ <!--
20
+ This is a stripped down config file used for a simple example...
21
+ It is *not* a good example to work from.
22
+ -->
23
+ <config>
24
+
25
+ <!-- Controls what version of Lucene various components of Solr
26
+ adhere to. Generally, you want to use the latest version to
27
+ get all bug fixes and improvements. It is highly recommended
28
+ that you fully re-index after changing this setting as it can
29
+ affect both how text is indexed and queried.
30
+ -->
31
+ <luceneMatchVersion>5.0.0</luceneMatchVersion>
32
+
33
+ <lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" />
34
+ <lib dir="${solr.install.dir:../../../..}/modules/extraction/lib" regex=".*\.jar" />>
35
+ <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lib" />
36
+ <lib dir="${solr.install.dir:../../../..}/contrib/analysis-extras/lucene-libs" />
37
+ <lib dir="${solr.install.dir:../../../..}/contrib/extraction/lib" regex=".*\.jar" />
38
+ <lib dir="${solr.install.dir:../../../..}/dist/" regex="solr-cell-\d.*\.jar" />
39
+
40
+ <directoryFactory name="DirectoryFactory"
41
+ class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}">
42
+ </directoryFactory>
43
+
44
+ <codecFactory class="solr.SchemaCodecFactory"/>
45
+
46
+ <schemaFactory class="ClassicIndexSchemaFactory"/>
47
+
48
+
49
+ <dataDir>${solr.blacklight-core.data.dir:}</dataDir>
50
+
51
+ <requestDispatcher handleSelect="true" >
52
+ <requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048000" />
53
+ </requestDispatcher>
54
+
55
+ <requestHandler name="/analysis/field" startup="lazy" class="solr.FieldAnalysisRequestHandler" />
56
+
57
+ <!-- config for the admin interface -->
58
+ <admin>
59
+ <defaultQuery>*:*</defaultQuery>
60
+ </admin>
61
+
62
+ <updateHandler class="solr.DirectUpdateHandler2">
63
+ <updateLog>
64
+ <str name="dir">${solr.ulog.dir:}</str>
65
+ </updateLog>
66
+
67
+ <autoCommit>
68
+ <maxTime>${solr.autoCommit.maxTime:15000}</maxTime>
69
+ <openSearcher>false</openSearcher>
70
+ </autoCommit>
71
+
72
+ <autoSoftCommit>
73
+ <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime>
74
+ </autoSoftCommit>
75
+ </updateHandler>
76
+
77
+ <!-- SearchHandler
78
+
79
+ http://wiki.apache.org/solr/SearchHandler
80
+
81
+ For processing Search Queries, the primary Request Handler
82
+ provided with Solr is "SearchHandler" It delegates to a sequent
83
+ of SearchComponents (see below) and supports distributed
84
+ queries across multiple shards
85
+ -->
86
+ <requestHandler name="search" class="solr.SearchHandler" default="true">
87
+ <!-- default values for query parameters can be specified, these
88
+ will be overridden by parameters in the request
89
+ -->
90
+ <lst name="defaults">
91
+ <str name="defType">edismax</str>
92
+ <str name="echoParams">explicit</str>
93
+ <str name="q.alt">*:*</str>
94
+ <str name="mm">2&lt;-1 5&lt;-2 6&lt;90%</str>
95
+ <int name="qs">1</int>
96
+ <int name="ps">2</int>
97
+ <float name="tie">0.01</float>
98
+ <!-- this qf and pf are used by default, if not otherwise specified by
99
+ client. The default blacklight_config will use these for the
100
+ "keywords" search. See the author_qf/author_pf, title_qf, etc
101
+ below, which the default blacklight_config will specify for
102
+ those searches. You may also be interested in:
103
+ http://wiki.apache.org/solr/LocalParams
104
+ -->
105
+ <str name="qf">
106
+ id
107
+ title_tesim
108
+ author_tesim
109
+ subject_tesim
110
+ </str>
111
+ <str name="pf">
112
+ all_text_timv^10
113
+ </str>
114
+
115
+ <str name="author_qf">
116
+ author_tesim
117
+ </str>
118
+ <str name="author_pf">
119
+ </str>
120
+ <str name="title_qf">
121
+ title_tesim
122
+ </str>
123
+ <str name="title_pf">
124
+ </str>
125
+ <str name="subject_qf">
126
+ subject_tesim
127
+ </str>
128
+ <str name="subject_pf">
129
+ </str>
130
+
131
+ <str name="fl">
132
+ *,
133
+ score
134
+ </str>
135
+
136
+ <str name="facet">true</str>
137
+ <str name="facet.mincount">1</str>
138
+
139
+ <str name="spellcheck">true</str>
140
+ <str name="spellcheck.dictionary">default</str>
141
+ <str name="spellcheck.onlyMorePopular">true</str>
142
+ <str name="spellcheck.extendedResults">true</str>
143
+ <str name="spellcheck.collate">false</str>
144
+ <str name="spellcheck.count">5</str>
145
+
146
+ </lst>
147
+ <arr name="last-components">
148
+ <str>spellcheck</str>
149
+ </arr>
150
+ </requestHandler>
151
+
152
+ <requestHandler name="permissions" class="solr.SearchHandler" >
153
+ <lst name="defaults">
154
+ <str name="facet">off</str>
155
+ <str name="echoParams">all</str>
156
+ <str name="rows">1</str>
157
+ <str name="q">{!raw f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
158
+ <str name="fl">
159
+ id,
160
+ access_ssim,
161
+ discover_access_group_ssim,discover_access_person_ssim,
162
+ read_access_group_ssim,read_access_person_ssim,
163
+ edit_access_group_ssim,edit_access_person_ssim,
164
+ depositor_ti,
165
+ embargo_release_date_dtsi
166
+ inheritable_access_ssim,
167
+ inheritable_discover_access_group_ssim,inheritable_discover_access_person_ssim,
168
+ inheritable_read_access_group_ssim,inheritable_read_access_person_ssim,
169
+ inheritable_edit_access_group_ssim,inheritable_edit_access_person_ssim,
170
+ inheritable_embargo_release_date_dtsi
171
+ </str>
172
+ </lst>
173
+ </requestHandler>
174
+
175
+ <requestHandler name="standard" class="solr.SearchHandler">
176
+ <lst name="defaults">
177
+ <str name="echoParams">explicit</str>
178
+ <str name="defType">lucene</str>
179
+ </lst>
180
+ </requestHandler>
181
+
182
+ <!-- for requests to get a single document; use id=666 instead of q=id:666 -->
183
+ <requestHandler name="document" class="solr.SearchHandler" >
184
+ <lst name="defaults">
185
+ <str name="echoParams">all</str>
186
+ <str name="fl">*</str>
187
+ <str name="rows">1</str>
188
+ <str name="q">{!term f=id v=$id}</str> <!-- use id=666 instead of q=id:666 -->
189
+ </lst>
190
+ </requestHandler>
191
+
192
+ <searchComponent name="termsComponent" class="solr.TermsComponent" />
193
+
194
+ <requestHandler name="/terms" class="solr.SearchHandler">
195
+ <lst name="defaults">
196
+ <bool name="terms">true</bool>
197
+ </lst>
198
+ <arr name="components">
199
+ <str>termsComponent</str>
200
+ </arr>
201
+ </requestHandler>
202
+
203
+ <!-- Spell Check
204
+
205
+ The spell check component can return a list of alternative spelling
206
+ suggestions.
207
+
208
+ http://wiki.apache.org/solr/SpellCheckComponent
209
+ -->
210
+ <searchComponent name="spellcheck" class="solr.SpellCheckComponent">
211
+
212
+ <str name="queryAnalyzerFieldType">textSpell</str>
213
+
214
+ <!-- Multiple "Spell Checkers" can be declared and used by this
215
+ component
216
+ -->
217
+
218
+ <!-- a spellchecker built from a field of the main index, and
219
+ written to disk
220
+ -->
221
+ <lst name="spellchecker">
222
+ <str name="name">default</str>
223
+ <str name="field">spell</str>
224
+ <str name="spellcheckIndexDir">./spell</str>
225
+ <str name="buildOnOptimize">true</str>
226
+ </lst>
227
+ <lst name="spellchecker">
228
+ <str name="name">author</str>
229
+ <str name="field">author_spell</str>
230
+ <str name="spellcheckIndexDir">./spell_author</str>
231
+ <str name="accuracy">0.7</str>
232
+ <str name="buildOnOptimize">true</str>
233
+ </lst>
234
+ <lst name="spellchecker">
235
+ <str name="name">subject</str>
236
+ <str name="field">subject_spell</str>
237
+ <str name="spellcheckIndexDir">./spell_subject</str>
238
+ <str name="accuracy">0.7</str>
239
+ <str name="buildOnOptimize">true</str>
240
+ </lst>
241
+ <lst name="spellchecker">
242
+ <str name="name">title</str>
243
+ <str name="field">title_spell</str>
244
+ <str name="spellcheckIndexDir">./spell_title</str>
245
+ <str name="accuracy">0.7</str>
246
+ <str name="buildOnOptimize">true</str>
247
+ </lst>
248
+
249
+ <!-- a spellchecker that uses a different distance measure -->
250
+ <!--
251
+ <lst name="spellchecker">
252
+ <str name="name">jarowinkler</str>
253
+ <str name="field">spell</str>
254
+ <str name="distanceMeasure">
255
+ org.apache.lucene.search.spell.JaroWinklerDistance
256
+ </str>
257
+ <str name="spellcheckIndexDir">spellcheckerJaro</str>
258
+ </lst>
259
+ -->
260
+
261
+ <!-- a spellchecker that use an alternate comparator
262
+
263
+ comparatorClass be one of:
264
+ 1. score (default)
265
+ 2. freq (Frequency first, then score)
266
+ 3. A fully qualified class name
267
+ -->
268
+ <!--
269
+ <lst name="spellchecker">
270
+ <str name="name">freq</str>
271
+ <str name="field">lowerfilt</str>
272
+ <str name="spellcheckIndexDir">spellcheckerFreq</str>
273
+ <str name="comparatorClass">freq</str>
274
+ <str name="buildOnCommit">true</str>
275
+ -->
276
+
277
+ <!-- A spellchecker that reads the list of words from a file -->
278
+ <!--
279
+ <lst name="spellchecker">
280
+ <str name="classname">solr.FileBasedSpellChecker</str>
281
+ <str name="name">file</str>
282
+ <str name="sourceLocation">spellings.txt</str>
283
+ <str name="characterEncoding">UTF-8</str>
284
+ <str name="spellcheckIndexDir">spellcheckerFile</str>
285
+ </lst>
286
+ -->
287
+ </searchComponent>
288
+
289
+ <!-- suggest searchComponent and requestHandler disabled by default due to performance penalties -->
290
+ <!--
291
+ <searchComponent name="suggest" class="solr.SuggestComponent">
292
+ <lst name="suggester">
293
+ <str name="name">mySuggester</str>
294
+ <str name="lookupImpl">FuzzyLookupFactory</str>
295
+ <str name="suggestAnalyzerFieldType">textSuggest</str>
296
+ <str name="buildOnCommit">true</str>
297
+ <str name="field">suggest</str>
298
+ </lst>
299
+ </searchComponent>
300
+
301
+ <requestHandler name="/suggest" class="solr.SearchHandler" startup="lazy">
302
+ <lst name="defaults">
303
+ <str name="suggest">true</str>
304
+ <str name="suggest.count">5</str>
305
+ <str name="suggest.dictionary">mySuggester</str>
306
+ </lst>
307
+ <arr name="components">
308
+ <str>suggest</str>
309
+ </arr>
310
+ </requestHandler>
311
+ -->
312
+
313
+ <requestHandler name="/update/extract" class="org.apache.solr.handler.extraction.ExtractingRequestHandler">
314
+ <lst name="defaults">
315
+ <str name="fmap.Last-Modified">last_modified</str>
316
+ <str name="uprefix">ignored_</str>
317
+ </lst>
318
+ <!--Optional. Specify a path to a tika configuration file. See the Tika docs for details.-->
319
+ <!-- <str name="tika.config">/my/path/to/tika.config</str> -->
320
+ <!-- Optional. Specify one or more date formats to parse. See DateUtil.DEFAULT_DATE_FORMATS
321
+ for default date formats -->
322
+ <!-- <lst name="date.formats"> -->
323
+ <!-- <str>yyyy&#45;MM&#45;dd</str> -->
324
+ <!-- </lst> -->
325
+ </requestHandler>
326
+ </config>
327
+
@@ -0,0 +1,2 @@
1
+ pizza
2
+ history
@@ -0,0 +1,58 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ #-----------------------------------------------------------------------
17
+ # a couple of test stopwords to test that the words are really being
18
+ # configured from this file:
19
+ stopworda
20
+ stopwordb
21
+
22
+ #Standard english stop words taken from Lucene's StopAnalyzer
23
+ a
24
+ an
25
+ and
26
+ are
27
+ as
28
+ at
29
+ be
30
+ but
31
+ by
32
+ for
33
+ if
34
+ in
35
+ into
36
+ is
37
+ it
38
+ no
39
+ not
40
+ of
41
+ on
42
+ or
43
+ s
44
+ such
45
+ t
46
+ that
47
+ the
48
+ their
49
+ then
50
+ there
51
+ these
52
+ they
53
+ this
54
+ to
55
+ was
56
+ will
57
+ with
58
+
@@ -0,0 +1,58 @@
1
+ # Licensed to the Apache Software Foundation (ASF) under one or more
2
+ # contributor license agreements. See the NOTICE file distributed with
3
+ # this work for additional information regarding copyright ownership.
4
+ # The ASF licenses this file to You under the Apache License, Version 2.0
5
+ # (the "License"); you may not use this file except in compliance with
6
+ # the License. You may obtain a copy of the License at
7
+ #
8
+ # http://www.apache.org/licenses/LICENSE-2.0
9
+ #
10
+ # Unless required by applicable law or agreed to in writing, software
11
+ # distributed under the License is distributed on an "AS IS" BASIS,
12
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ # See the License for the specific language governing permissions and
14
+ # limitations under the License.
15
+
16
+ #-----------------------------------------------------------------------
17
+ # a couple of test stopwords to test that the words are really being
18
+ # configured from this file:
19
+ stopworda
20
+ stopwordb
21
+
22
+ #Standard english stop words taken from Lucene's StopAnalyzer
23
+ a
24
+ an
25
+ and
26
+ are
27
+ as
28
+ at
29
+ be
30
+ but
31
+ by
32
+ for
33
+ if
34
+ in
35
+ into
36
+ is
37
+ it
38
+ no
39
+ not
40
+ of
41
+ on
42
+ or
43
+ s
44
+ such
45
+ t
46
+ that
47
+ the
48
+ their
49
+ then
50
+ there
51
+ these
52
+ they
53
+ this
54
+ to
55
+ was
56
+ will
57
+ with
58
+
@@ -0,0 +1,31 @@
1
+ # The ASF licenses this file to You under the Apache License, Version 2.0
2
+ # (the "License"); you may not use this file except in compliance with
3
+ # the License. You may obtain a copy of the License at
4
+ #
5
+ # http://www.apache.org/licenses/LICENSE-2.0
6
+ #
7
+ # Unless required by applicable law or agreed to in writing, software
8
+ # distributed under the License is distributed on an "AS IS" BASIS,
9
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10
+ # See the License for the specific language governing permissions and
11
+ # limitations under the License.
12
+
13
+ #-----------------------------------------------------------------------
14
+ #some test synonym mappings unlikely to appear in real input text
15
+ aaa => aaaa
16
+ bbb => bbbb1 bbbb2
17
+ ccc => cccc1,cccc2
18
+ a\=>a => b\=>b
19
+ a\,a => b\,b
20
+ fooaaa,baraaa,bazaaa
21
+
22
+ # Some synonym groups specific to this example
23
+ GB,gib,gigabyte,gigabytes
24
+ MB,mib,megabyte,megabytes
25
+ Television, Televisions, TV, TVs
26
+ #notice we use "gib" instead of "GiB" so any WordDelimiterFilter coming
27
+ #after us won't split it into two words.
28
+
29
+ # Synonym mappings can be used for spelling correction too
30
+ pixima => pixma
31
+
@@ -0,0 +1,132 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+
3
+ <!--
4
+ * Licensed to the Apache Software Foundation (ASF) under one or more
5
+ * contributor license agreements. See the NOTICE file distributed with
6
+ * this work for additional information regarding copyright ownership.
7
+ * The ASF licenses this file to You under the Apache License, Version 2.0
8
+ * (the "License"); you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ -->
19
+
20
+ <!--
21
+ Simple transform of Solr query results to HTML
22
+ -->
23
+ <xsl:stylesheet version='1.0'
24
+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'
25
+ >
26
+
27
+ <xsl:output media-type="text/html; charset=UTF-8" encoding="UTF-8"/>
28
+
29
+ <xsl:variable name="title" select="concat('Solr search results (',response/result/@numFound,' documents)')"/>
30
+
31
+ <xsl:template match='/'>
32
+ <html>
33
+ <head>
34
+ <title><xsl:value-of select="$title"/></title>
35
+ <xsl:call-template name="css"/>
36
+ </head>
37
+ <body>
38
+ <h1><xsl:value-of select="$title"/></h1>
39
+ <div class="note">
40
+ This has been formatted by the sample "example.xsl" transform -
41
+ use your own XSLT to get a nicer page
42
+ </div>
43
+ <xsl:apply-templates select="response/result/doc"/>
44
+ </body>
45
+ </html>
46
+ </xsl:template>
47
+
48
+ <xsl:template match="doc">
49
+ <xsl:variable name="pos" select="position()"/>
50
+ <div class="doc">
51
+ <table width="100%">
52
+ <xsl:apply-templates>
53
+ <xsl:with-param name="pos"><xsl:value-of select="$pos"/></xsl:with-param>
54
+ </xsl:apply-templates>
55
+ </table>
56
+ </div>
57
+ </xsl:template>
58
+
59
+ <xsl:template match="doc/*[@name='score']" priority="100">
60
+ <xsl:param name="pos"></xsl:param>
61
+ <tr>
62
+ <td class="name">
63
+ <xsl:value-of select="@name"/>
64
+ </td>
65
+ <td class="value">
66
+ <xsl:value-of select="."/>
67
+
68
+ <xsl:if test="boolean(//lst[@name='explain'])">
69
+ <xsl:element name="a">
70
+ <!-- can't allow whitespace here -->
71
+ <xsl:attribute name="href">javascript:toggle("<xsl:value-of select="concat('exp-',$pos)" />");</xsl:attribute>?</xsl:element>
72
+ <br/>
73
+ <xsl:element name="div">
74
+ <xsl:attribute name="class">exp</xsl:attribute>
75
+ <xsl:attribute name="id">
76
+ <xsl:value-of select="concat('exp-',$pos)" />
77
+ </xsl:attribute>
78
+ <xsl:value-of select="//lst[@name='explain']/str[position()=$pos]"/>
79
+ </xsl:element>
80
+ </xsl:if>
81
+ </td>
82
+ </tr>
83
+ </xsl:template>
84
+
85
+ <xsl:template match="doc/arr" priority="100">
86
+ <tr>
87
+ <td class="name">
88
+ <xsl:value-of select="@name"/>
89
+ </td>
90
+ <td class="value">
91
+ <ul>
92
+ <xsl:for-each select="*">
93
+ <li><xsl:value-of select="."/></li>
94
+ </xsl:for-each>
95
+ </ul>
96
+ </td>
97
+ </tr>
98
+ </xsl:template>
99
+
100
+
101
+ <xsl:template match="doc/*">
102
+ <tr>
103
+ <td class="name">
104
+ <xsl:value-of select="@name"/>
105
+ </td>
106
+ <td class="value">
107
+ <xsl:value-of select="."/>
108
+ </td>
109
+ </tr>
110
+ </xsl:template>
111
+
112
+ <xsl:template match="*"/>
113
+
114
+ <xsl:template name="css">
115
+ <script>
116
+ function toggle(id) {
117
+ var obj = document.getElementById(id);
118
+ obj.style.display = (obj.style.display != 'block') ? 'block' : 'none';
119
+ }
120
+ </script>
121
+ <style type="text/css">
122
+ body { font-family: "Lucida Grande", sans-serif }
123
+ td.name { font-style: italic; font-size:80%; }
124
+ td { vertical-align: top; }
125
+ ul { margin: 0px; margin-left: 1em; padding: 0px; }
126
+ .note { font-size:80%; }
127
+ .doc { margin-top: 1em; border-top: solid grey 1px; }
128
+ .exp { display: none; font-family: monospace; white-space: pre; }
129
+ </style>
130
+ </xsl:template>
131
+
132
+ </xsl:stylesheet>
@@ -0,0 +1,67 @@
1
+ <?xml version='1.0' encoding='UTF-8'?>
2
+
3
+ <!--
4
+ * Licensed to the Apache Software Foundation (ASF) under one or more
5
+ * contributor license agreements. See the NOTICE file distributed with
6
+ * this work for additional information regarding copyright ownership.
7
+ * The ASF licenses this file to You under the Apache License, Version 2.0
8
+ * (the "License"); you may not use this file except in compliance with
9
+ * the License. You may obtain a copy of the License at
10
+ *
11
+ * http://www.apache.org/licenses/LICENSE-2.0
12
+ *
13
+ * Unless required by applicable law or agreed to in writing, software
14
+ * distributed under the License is distributed on an "AS IS" BASIS,
15
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ * See the License for the specific language governing permissions and
17
+ * limitations under the License.
18
+ -->
19
+
20
+ <!--
21
+ Simple transform of Solr query results to Atom
22
+ -->
23
+
24
+ <xsl:stylesheet version='1.0'
25
+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
26
+
27
+ <xsl:output
28
+ method="xml"
29
+ encoding="utf-8"
30
+ media-type="text/xml; charset=UTF-8"
31
+ />
32
+
33
+ <xsl:template match='/'>
34
+ <xsl:variable name="query" select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='q']"/>
35
+ <feed xmlns="http://www.w3.org/2005/Atom">
36
+ <title>Example Solr Atom 1.0 Feed</title>
37
+ <subtitle>
38
+ This has been formatted by the sample "example_atom.xsl" transform -
39
+ use your own XSLT to get a nicer Atom feed.
40
+ </subtitle>
41
+ <author>
42
+ <name>Apache Solr</name>
43
+ <email>solr-user@lucene.apache.org</email>
44
+ </author>
45
+ <link rel="self" type="application/atom+xml"
46
+ href="http://localhost:8983/solr/q={$query}&amp;wt=xslt&amp;tr=atom.xsl"/>
47
+ <updated>
48
+ <xsl:value-of select="response/result/doc[position()=1]/date[@name='timestamp']"/>
49
+ </updated>
50
+ <id>tag:localhost,2007:example</id>
51
+ <xsl:apply-templates select="response/result/doc"/>
52
+ </feed>
53
+ </xsl:template>
54
+
55
+ <!-- search results xslt -->
56
+ <xsl:template match="doc">
57
+ <xsl:variable name="id" select="str[@name='id']"/>
58
+ <entry>
59
+ <title><xsl:value-of select="str[@name='name']"/></title>
60
+ <link href="http://localhost:8983/solr/select?q={$id}"/>
61
+ <id>tag:localhost,2007:<xsl:value-of select="$id"/></id>
62
+ <summary><xsl:value-of select="arr[@name='features']"/></summary>
63
+ <updated><xsl:value-of select="date[@name='timestamp']"/></updated>
64
+ </entry>
65
+ </xsl:template>
66
+
67
+ </xsl:stylesheet>