tanning_bed_solr 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (155) hide show
  1. data/.bnsignore +18 -0
  2. data/.gitignore +9 -0
  3. data/History.txt +4 -0
  4. data/README.txt +45 -0
  5. data/Rakefile +18 -0
  6. data/lib/tanning_bed_solr.rb +65 -0
  7. data/vendor/solr/README.txt +42 -0
  8. data/vendor/solr/etc/jetty.xml +212 -0
  9. data/vendor/solr/etc/webdefault.xml +379 -0
  10. data/vendor/solr/example-DIH/README.txt +43 -0
  11. data/vendor/solr/example-DIH/hsqldb/ex.backup +0 -0
  12. data/vendor/solr/example-DIH/hsqldb/ex.data +0 -0
  13. data/vendor/solr/example-DIH/hsqldb/ex.log +2 -0
  14. data/vendor/solr/example-DIH/hsqldb/ex.properties +17 -0
  15. data/vendor/solr/example-DIH/hsqldb/ex.script +12 -0
  16. data/vendor/solr/example-DIH/solr/db/conf/admin-extra.html +31 -0
  17. data/vendor/solr/example-DIH/solr/db/conf/db-data-config.xml +31 -0
  18. data/vendor/solr/example-DIH/solr/db/conf/elevate.xml +36 -0
  19. data/vendor/solr/example-DIH/solr/db/conf/protwords.txt +21 -0
  20. data/vendor/solr/example-DIH/solr/db/conf/schema.xml +356 -0
  21. data/vendor/solr/example-DIH/solr/db/conf/scripts.conf +24 -0
  22. data/vendor/solr/example-DIH/solr/db/conf/solrconfig.xml +705 -0
  23. data/vendor/solr/example-DIH/solr/db/conf/stopwords.txt +58 -0
  24. data/vendor/solr/example-DIH/solr/db/conf/synonyms.txt +31 -0
  25. data/vendor/solr/example-DIH/solr/db/conf/xslt/example.xsl +132 -0
  26. data/vendor/solr/example-DIH/solr/db/conf/xslt/example_atom.xsl +63 -0
  27. data/vendor/solr/example-DIH/solr/db/conf/xslt/example_rss.xsl +62 -0
  28. data/vendor/solr/example-DIH/solr/db/conf/xslt/luke.xsl +345 -0
  29. data/vendor/solr/example-DIH/solr/db/lib/hsqldb-1.8.0.10.jar +0 -0
  30. data/vendor/solr/example-DIH/solr/mail/conf/data-config.xml +11 -0
  31. data/vendor/solr/example-DIH/solr/mail/conf/protwords.txt +21 -0
  32. data/vendor/solr/example-DIH/solr/mail/conf/schema.xml +370 -0
  33. data/vendor/solr/example-DIH/solr/mail/conf/solrconfig.xml +807 -0
  34. data/vendor/solr/example-DIH/solr/mail/conf/stopwords.txt +58 -0
  35. data/vendor/solr/example-DIH/solr/mail/conf/synonyms.txt +31 -0
  36. data/vendor/solr/example-DIH/solr/rss/conf/admin-extra.html +31 -0
  37. data/vendor/solr/example-DIH/solr/rss/conf/elevate.xml +36 -0
  38. data/vendor/solr/example-DIH/solr/rss/conf/protwords.txt +21 -0
  39. data/vendor/solr/example-DIH/solr/rss/conf/rss-data-config.xml +26 -0
  40. data/vendor/solr/example-DIH/solr/rss/conf/schema.xml +316 -0
  41. data/vendor/solr/example-DIH/solr/rss/conf/scripts.conf +24 -0
  42. data/vendor/solr/example-DIH/solr/rss/conf/solrconfig.xml +704 -0
  43. data/vendor/solr/example-DIH/solr/rss/conf/stopwords.txt +58 -0
  44. data/vendor/solr/example-DIH/solr/rss/conf/synonyms.txt +31 -0
  45. data/vendor/solr/example-DIH/solr/solr.xml +8 -0
  46. data/vendor/solr/exampledocs/books.csv +11 -0
  47. data/vendor/solr/exampledocs/hd.xml +48 -0
  48. data/vendor/solr/exampledocs/ipod_other.xml +52 -0
  49. data/vendor/solr/exampledocs/ipod_video.xml +36 -0
  50. data/vendor/solr/exampledocs/mem.xml +60 -0
  51. data/vendor/solr/exampledocs/monitor.xml +31 -0
  52. data/vendor/solr/exampledocs/monitor2.xml +30 -0
  53. data/vendor/solr/exampledocs/mp500.xml +39 -0
  54. data/vendor/solr/exampledocs/payload.xml +57 -0
  55. data/vendor/solr/exampledocs/post.jar +0 -0
  56. data/vendor/solr/exampledocs/post.sh +28 -0
  57. data/vendor/solr/exampledocs/sd500.xml +34 -0
  58. data/vendor/solr/exampledocs/solr.xml +38 -0
  59. data/vendor/solr/exampledocs/test_utf8.sh +83 -0
  60. data/vendor/solr/exampledocs/utf8-example.xml +42 -0
  61. data/vendor/solr/exampledocs/vidcard.xml +54 -0
  62. data/vendor/solr/lib/jetty-6.1.3.jar +0 -0
  63. data/vendor/solr/lib/jetty-util-6.1.3.jar +0 -0
  64. data/vendor/solr/lib/jsp-2.1/ant-1.6.5.jar +0 -0
  65. data/vendor/solr/lib/jsp-2.1/core-3.1.1.jar +0 -0
  66. data/vendor/solr/lib/jsp-2.1/jsp-2.1.jar +0 -0
  67. data/vendor/solr/lib/jsp-2.1/jsp-api-2.1.jar +0 -0
  68. data/vendor/solr/lib/servlet-api-2.5-6.1.3.jar +0 -0
  69. data/vendor/solr/logs/.keep +0 -0
  70. data/vendor/solr/multicore/README.txt +3 -0
  71. data/vendor/solr/multicore/core0/conf/schema.xml +41 -0
  72. data/vendor/solr/multicore/core0/conf/solrconfig.xml +40 -0
  73. data/vendor/solr/multicore/core1/conf/schema.xml +41 -0
  74. data/vendor/solr/multicore/core1/conf/solrconfig.xml +40 -0
  75. data/vendor/solr/multicore/exampledocs/ipod_other.xml +34 -0
  76. data/vendor/solr/multicore/exampledocs/ipod_video.xml +22 -0
  77. data/vendor/solr/multicore/solr.xml +35 -0
  78. data/vendor/solr/solr/README.txt +54 -0
  79. data/vendor/solr/solr/conf/admin-extra.html +31 -0
  80. data/vendor/solr/solr/conf/elevate.xml +36 -0
  81. data/vendor/solr/solr/conf/mapping-ISOLatin1Accent.txt +246 -0
  82. data/vendor/solr/solr/conf/protwords.txt +21 -0
  83. data/vendor/solr/solr/conf/schema.xml +126 -0
  84. data/vendor/solr/solr/conf/scripts.conf +24 -0
  85. data/vendor/solr/solr/conf/solrconfig.xml +458 -0
  86. data/vendor/solr/solr/conf/spellings.txt +2 -0
  87. data/vendor/solr/solr/conf/stopwords.txt +58 -0
  88. data/vendor/solr/solr/conf/synonyms.txt +31 -0
  89. data/vendor/solr/solr/conf/xslt/example.xsl +132 -0
  90. data/vendor/solr/solr/conf/xslt/example_atom.xsl +67 -0
  91. data/vendor/solr/solr/conf/xslt/example_rss.xsl +66 -0
  92. data/vendor/solr/solr/conf/xslt/luke.xsl +337 -0
  93. data/vendor/solr/start.jar +0 -0
  94. data/vendor/solr/webapps/solr.war +0 -0
  95. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/jsp/org/apache/jsp/admin/index_jsp.class +0 -0
  96. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/jsp/org/apache/jsp/index_jsp.class +0 -0
  97. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/META-INF/LICENSE.txt +1086 -0
  98. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/META-INF/NOTICE.txt +254 -0
  99. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-core-1.4.0.jar +0 -0
  100. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-dataimporthandler-1.4.0.jar +0 -0
  101. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/apache-solr-solrj-1.4.0.jar +0 -0
  102. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/commons-codec-1.3.jar +0 -0
  103. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/commons-csv-1.0-SNAPSHOT-r609327.jar +0 -0
  104. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/commons-fileupload-1.2.1.jar +0 -0
  105. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/commons-httpclient-3.1.jar +0 -0
  106. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/commons-io-1.4.jar +0 -0
  107. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/geronimo-stax-api_1.0_spec-1.0.1.jar +0 -0
  108. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/jcl-over-slf4j-1.5.5.jar +0 -0
  109. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-analyzers-2.9.1.jar +0 -0
  110. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-core-2.9.1.jar +0 -0
  111. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-highlighter-2.9.1.jar +0 -0
  112. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-memory-2.9.1.jar +0 -0
  113. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-misc-2.9.1.jar +0 -0
  114. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-queries-2.9.1.jar +0 -0
  115. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-snowball-2.9.1.jar +0 -0
  116. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/lucene-spellchecker-2.9.1.jar +0 -0
  117. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/slf4j-api-1.5.5.jar +0 -0
  118. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/slf4j-jdk14-1.5.5.jar +0 -0
  119. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/lib/wstx-asl-3.2.7.jar +0 -0
  120. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/web.xml +148 -0
  121. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/WEB-INF/weblogic.xml +12 -0
  122. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/_info.jsp +118 -0
  123. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/action.jsp +94 -0
  124. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/analysis.jsp +498 -0
  125. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/analysis.xsl +179 -0
  126. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/dataimport.jsp +54 -0
  127. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/debug.jsp +106 -0
  128. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/distributiondump.jsp +160 -0
  129. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/favicon.ico +0 -0
  130. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/form.jsp +137 -0
  131. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/get-file.jsp +72 -0
  132. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/get-properties.jsp +24 -0
  133. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/header.jsp +41 -0
  134. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/index.jsp +156 -0
  135. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/jquery-1.2.3.min.js +32 -0
  136. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/meta.xsl +34 -0
  137. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/ping.jsp +52 -0
  138. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/ping.xsl +71 -0
  139. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/raw-schema.jsp +38 -0
  140. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/registry.jsp +107 -0
  141. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/registry.xsl +321 -0
  142. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/replication/header.jsp +89 -0
  143. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/replication/index.jsp +378 -0
  144. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/schema.jsp +657 -0
  145. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/solr-admin.css +215 -0
  146. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/solr_small.png +0 -0
  147. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/stats.jsp +92 -0
  148. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/stats.xsl +220 -0
  149. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/tabular.xsl +141 -0
  150. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/threaddump.jsp +110 -0
  151. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/admin/threaddump.xsl +103 -0
  152. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/favicon.ico +0 -0
  153. data/vendor/solr/work/Jetty_0_0_0_0_8983_solr.war__solr__k1kf17/webapp/index.jsp +42 -0
  154. data/version.txt +1 -0
  155. metadata +251 -0
@@ -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,63 @@
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 method="xml" encoding="utf-8" />
28
+
29
+ <xsl:template match='/'>
30
+ <xsl:variable name="query" select="response/lst[@name='responseHeader']/lst[@name='params']/str[@name='q']"/>
31
+ <feed xmlns="http://www.w3.org/2005/Atom">
32
+ <title>Example Solr Atom 1.0 Feed</title>
33
+ <subtitle>
34
+ This has been formatted by the sample "example_atom.xsl" transform -
35
+ use your own XSLT to get a nicer Atom feed.
36
+ </subtitle>
37
+ <author>
38
+ <name>Apache Solr</name>
39
+ <email>solr-user@lucene.apache.org</email>
40
+ </author>
41
+ <link rel="self" type="application/atom+xml"
42
+ href="http://localhost:8983/solr/q={$query}&amp;wt=xslt&amp;tr=atom.xsl"/>
43
+ <updated>
44
+ <xsl:value-of select="response/result/doc[position()=1]/date[@name='timestamp']"/>
45
+ </updated>
46
+ <id>tag:localhost,2007:example</id>
47
+ <xsl:apply-templates select="response/result/doc"/>
48
+ </feed>
49
+ </xsl:template>
50
+
51
+ <!-- search results xslt -->
52
+ <xsl:template match="doc">
53
+ <xsl:variable name="id" select="str[@name='id']"/>
54
+ <entry>
55
+ <title><xsl:value-of select="str[@name='name']"/></title>
56
+ <link href="http://localhost:8983/solr/select?q={$id}"/>
57
+ <id>tag:localhost,2007:<xsl:value-of select="$id"/></id>
58
+ <summary><xsl:value-of select="arr[@name='features']"/></summary>
59
+ <updated><xsl:value-of select="date[@name='timestamp']"/></updated>
60
+ </entry>
61
+ </xsl:template>
62
+
63
+ </xsl:stylesheet>
@@ -0,0 +1,62 @@
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 RSS
22
+ -->
23
+
24
+ <xsl:stylesheet version='1.0'
25
+ xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
26
+
27
+ <xsl:output method="xml" encoding="utf-8" />
28
+ <xsl:template match='/'>
29
+ <rss version="2.0">
30
+ <channel>
31
+ <title>Example Solr RSS 2.0 Feed</title>
32
+ <link>http://localhost:8983/solr</link>
33
+ <description>
34
+ This has been formatted by the sample "example_rss.xsl" transform -
35
+ use your own XSLT to get a nicer RSS feed.
36
+ </description>
37
+ <language>en-us</language>
38
+ <docs>http://localhost:8983/solr</docs>
39
+ <xsl:apply-templates select="response/result/doc"/>
40
+ </channel>
41
+ </rss>
42
+ </xsl:template>
43
+
44
+ <!-- search results xslt -->
45
+ <xsl:template match="doc">
46
+ <xsl:variable name="id" select="str[@name='id']"/>
47
+ <xsl:variable name="timestamp" select="date[@name='timestamp']"/>
48
+ <item>
49
+ <title><xsl:value-of select="str[@name='name']"/></title>
50
+ <link>
51
+ http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
52
+ </link>
53
+ <description>
54
+ <xsl:value-of select="arr[@name='features']"/>
55
+ </description>
56
+ <pubDate><xsl:value-of select="$timestamp"/></pubDate>
57
+ <guid>
58
+ http://localhost:8983/solr/select?q=id:<xsl:value-of select="$id"/>
59
+ </guid>
60
+ </item>
61
+ </xsl:template>
62
+ </xsl:stylesheet>
@@ -0,0 +1,345 @@
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
+ <!--
21
+ Display the luke request handler with graphs
22
+ -->
23
+ <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
24
+ xmlns="http://www.w3.org/1999/xhtml" xmlns:svg="http://www.w3.org/2000/svg" version="1.0">
25
+ <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN"
26
+ doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" encoding="UTF-8"/>
27
+
28
+ <xsl:variable name="title">Solr Luke Request Handler Response</xsl:variable>
29
+
30
+ <xsl:template match="/">
31
+ <html xmlns="http://www.w3.org/1999/xhtml">
32
+ <head>
33
+ <title>
34
+ <xsl:value-of select="$title"/>
35
+ </title>
36
+ <!-- <xsl:call-template name="svg_ie_workaround"/> -->
37
+ <xsl:call-template name="css"/>
38
+ <meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8"/>
39
+ </head>
40
+ <body>
41
+ <h1>
42
+ <xsl:value-of select="$title"/>
43
+ </h1>
44
+ <div class="doc">
45
+ <ul>
46
+ <xsl:if test="response/lst[@name='index']">
47
+ <li>
48
+ <a href="#index">Index Statistics</a>
49
+ </li>
50
+ </xsl:if>
51
+ <xsl:if test="response/lst[@name='fields']">
52
+ <li>
53
+ <a href="#fields">Field Statistics</a>
54
+ </li>
55
+ <li>
56
+ <ul>
57
+ <xsl:for-each select="response/lst[@name='fields']/lst">
58
+ <li>
59
+ <a href="#{@name}">
60
+ <xsl:value-of select="@name"/>
61
+ </a>
62
+ </li>
63
+ </xsl:for-each>
64
+ </ul>
65
+ </li>
66
+ </xsl:if>
67
+ <xsl:if test="response/lst[@name='doc']">
68
+ <li>
69
+ <a href="#doc">Document statistics</a>
70
+ </li>
71
+ </xsl:if>
72
+ </ul>
73
+ </div>
74
+ <xsl:if test="response/lst[@name='index']">
75
+ <h2><a name="index"/>Index statistics</h2>
76
+ <xsl:apply-templates select="response/lst[@name='index']"/>
77
+ </xsl:if>
78
+ <xsl:if test="response/lst[@name='fields']">
79
+ <h2><a name="fields"/>Field statistics</h2>
80
+ <xsl:apply-templates select="response/lst[@name='fields']"/>
81
+ </xsl:if>
82
+ <xsl:if test="response/lst[@name='doc']">
83
+ <h2><a name="doc"/>Document statistics</h2>
84
+ <xsl:apply-templates select="response/lst[@name='doc']"/>
85
+ </xsl:if>
86
+ </body>
87
+ </html>
88
+ </xsl:template>
89
+
90
+ <xsl:template match="lst">
91
+ <xsl:if test="parent::lst">
92
+ <tr>
93
+ <td colspan="2">
94
+ <div class="doc">
95
+ <xsl:call-template name="list"/>
96
+ </div>
97
+ </td>
98
+ </tr>
99
+ </xsl:if>
100
+ <xsl:if test="not(parent::lst)">
101
+ <div class="doc">
102
+ <xsl:call-template name="list"/>
103
+ </div>
104
+ </xsl:if>
105
+ </xsl:template>
106
+
107
+ <xsl:template name="list">
108
+ <xsl:if test="count(child::*)>0">
109
+ <table>
110
+ <thead>
111
+ <tr>
112
+ <th colspan="2">
113
+ <p>
114
+ <a name="{@name}"/>
115
+ </p>
116
+ <xsl:value-of select="@name"/>
117
+ </th>
118
+ </tr>
119
+ </thead>
120
+ <tbody>
121
+ <xsl:choose>
122
+ <xsl:when
123
+ test="@name='histogram' and not(system-property('xsl:vendor')='Microsoft')">
124
+ <tr>
125
+ <td colspan="2">
126
+ <xsl:call-template name="histogram"/>
127
+ </td>
128
+ </tr>
129
+ </xsl:when>
130
+ <xsl:otherwise>
131
+ <xsl:apply-templates/>
132
+ </xsl:otherwise>
133
+ </xsl:choose>
134
+ </tbody>
135
+ </table>
136
+ </xsl:if>
137
+ </xsl:template>
138
+
139
+ <xsl:template name="histogram">
140
+ <div class="doc">
141
+ <xsl:call-template name="barchart">
142
+ <xsl:with-param name="xoffset">5</xsl:with-param>
143
+ <xsl:with-param name="yoffset">5</xsl:with-param>
144
+ <xsl:with-param name="iwidth">800</xsl:with-param>
145
+ <xsl:with-param name="iheight">600</xsl:with-param>
146
+ <xsl:with-param name="fill">blue</xsl:with-param>
147
+ </xsl:call-template>
148
+ </div>
149
+ </xsl:template>
150
+
151
+ <xsl:template name="barchart">
152
+ <xsl:param name="xoffset"/>
153
+ <xsl:param name="yoffset"/>
154
+ <xsl:param name="iwidth"/>
155
+ <xsl:param name="iheight"/>
156
+ <xsl:param name="fill"/>
157
+ <svg:svg viewBox="0 0 {$iwidth} {$iheight}">
158
+ <xsl:if test="system-property('xsl:vendor')='Opera' or system-property('xsl:vendor')='libxslt'">
159
+ <xsl:attribute name="width"><xsl:value-of select="$iwidth"/></xsl:attribute>
160
+ <xsl:attribute name="height"><xsl:value-of select="$iwidth"/></xsl:attribute>
161
+ </xsl:if>
162
+ <xsl:variable name="x" select="$xoffset + 5"/>
163
+ <xsl:variable name="y" select="$yoffset + 5"/>
164
+ <xsl:variable name="width" select="$iwidth - 10"/>
165
+ <xsl:variable name="height" select="$iheight - 30"/>
166
+ <xsl:variable name="max">
167
+ <xsl:for-each select="int">
168
+ <xsl:sort data-type="number" order="descending"/>
169
+ <xsl:if test="position()=1">
170
+ <xsl:value-of select="."/>
171
+ </xsl:if>
172
+ </xsl:for-each>
173
+ </xsl:variable>
174
+ <xsl:variable name="yRatio" select="$height div $max"/>
175
+ <xsl:variable name="xRatio" select="$width div count(int)"/>
176
+ <svg:g>
177
+ <xsl:for-each select="int">
178
+ <svg:rect stroke="none" x="{$x + (position() - 1) * $xRatio + 0.1 * $xRatio}"
179
+ y="{($y + $height) - number(.) * $yRatio}" width="{0.8 * $xRatio}"
180
+ height="{number(.) * $yRatio}" fill="{$fill}"/>
181
+ <xsl:variable name="yboost">
182
+ <xsl:choose>
183
+ <xsl:when
184
+ test="($y + $height) - number(.) * $yRatio +40 &gt; $iheight"
185
+ >-25</xsl:when>
186
+ <xsl:otherwise>0</xsl:otherwise>
187
+ </xsl:choose>
188
+ </xsl:variable>
189
+ <svg:text
190
+ x="{$x + (position() - 1) * $xRatio + 0.1 * $xRatio + (($xRatio * 0.8) div 2)}"
191
+ y="{($y + $height) - number(.) * $yRatio +20 + number($yboost)}"
192
+ text-anchor="middle" style="fill: red; font-size: 8px;">
193
+ <xsl:value-of select="."/>
194
+ </svg:text>
195
+ <svg:text
196
+ x="{$x + (position() - 1) * $xRatio + 0.1 * $xRatio + (($xRatio * 0.8) div 2)}"
197
+ y="{$y + $height + 20}" text-anchor="middle" style="fill: black; font-size: 8px;">
198
+ <xsl:value-of select="@name"/>
199
+ </svg:text>
200
+ </xsl:for-each>
201
+ </svg:g>
202
+ </svg:svg>
203
+ </xsl:template>
204
+
205
+ <xsl:template name="keyvalue">
206
+ <xsl:choose>
207
+ <xsl:when test="@name">
208
+ <tr>
209
+ <td class="name">
210
+ <xsl:value-of select="@name"/>
211
+ </td>
212
+ <td class="value">
213
+ <xsl:value-of select="."/>
214
+ </td>
215
+ </tr>
216
+ </xsl:when>
217
+ <xsl:otherwise>
218
+ <xsl:value-of select="."/>
219
+ </xsl:otherwise>
220
+ </xsl:choose>
221
+ </xsl:template>
222
+
223
+ <xsl:template match="int|bool|long|float|double|uuid|date">
224
+ <xsl:call-template name="keyvalue"/>
225
+ </xsl:template>
226
+
227
+ <xsl:template match="arr">
228
+ <tr>
229
+ <td class="name">
230
+ <xsl:value-of select="@name"/>
231
+ </td>
232
+ <td class="value">
233
+ <ul>
234
+ <xsl:for-each select="child::*">
235
+ <li>
236
+ <xsl:apply-templates/>
237
+ </li>
238
+ </xsl:for-each>
239
+ </ul>
240
+ </td>
241
+ </tr>
242
+ </xsl:template>
243
+
244
+ <xsl:template match="str">
245
+ <xsl:choose>
246
+ <xsl:when test="@name='schema' or @name='index' or @name='flags'">
247
+ <xsl:call-template name="schema"/>
248
+ </xsl:when>
249
+ <xsl:otherwise>
250
+ <xsl:call-template name="keyvalue"/>
251
+ </xsl:otherwise>
252
+ </xsl:choose>
253
+ </xsl:template>
254
+
255
+ <xsl:template name="schema">
256
+ <tr>
257
+ <td class="name">
258
+ <xsl:value-of select="@name"/>
259
+ </td>
260
+ <td class="value">
261
+ <xsl:if test="contains(.,'unstored')">
262
+ <xsl:value-of select="."/>
263
+ </xsl:if>
264
+ <xsl:if test="not(contains(.,'unstored'))">
265
+ <xsl:call-template name="infochar2string">
266
+ <xsl:with-param name="charList">
267
+ <xsl:value-of select="."/>
268
+ </xsl:with-param>
269
+ </xsl:call-template>
270
+ </xsl:if>
271
+ </td>
272
+ </tr>
273
+ </xsl:template>
274
+
275
+ <xsl:template name="infochar2string">
276
+ <xsl:param name="i">1</xsl:param>
277
+ <xsl:param name="charList"/>
278
+
279
+ <xsl:variable name="char">
280
+ <xsl:value-of select="substring($charList,$i,1)"/>
281
+ </xsl:variable>
282
+ <xsl:choose>
283
+ <xsl:when test="$char='I'">
284
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='I']"/> - </xsl:when>
285
+ <xsl:when test="$char='T'">
286
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='T']"/> - </xsl:when>
287
+ <xsl:when test="$char='S'">
288
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='S']"/> - </xsl:when>
289
+ <xsl:when test="$char='M'">
290
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='M']"/> - </xsl:when>
291
+ <xsl:when test="$char='V'">
292
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='V']"/> - </xsl:when>
293
+ <xsl:when test="$char='o'">
294
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='o']"/> - </xsl:when>
295
+ <xsl:when test="$char='p'">
296
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='p']"/> - </xsl:when>
297
+ <xsl:when test="$char='O'">
298
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='O']"/> - </xsl:when>
299
+ <xsl:when test="$char='L'">
300
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='L']"/> - </xsl:when>
301
+ <xsl:when test="$char='B'">
302
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='B']"/> - </xsl:when>
303
+ <xsl:when test="$char='C'">
304
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='C']"/> - </xsl:when>
305
+ <xsl:when test="$char='f'">
306
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='f']"/> - </xsl:when>
307
+ <xsl:when test="$char='l'">
308
+ <xsl:value-of select="/response/lst[@name='info']/lst/str[@name='l']"/> -
309
+ </xsl:when>
310
+ </xsl:choose>
311
+
312
+ <xsl:if test="not($i>=string-length($charList))">
313
+ <xsl:call-template name="infochar2string">
314
+ <xsl:with-param name="i">
315
+ <xsl:value-of select="$i+1"/>
316
+ </xsl:with-param>
317
+ <xsl:with-param name="charList">
318
+ <xsl:value-of select="$charList"/>
319
+ </xsl:with-param>
320
+ </xsl:call-template>
321
+ </xsl:if>
322
+ </xsl:template>
323
+ <xsl:template name="css">
324
+ <style type="text/css">
325
+ <![CDATA[
326
+ body { font-family: "Lucida Grande", sans-serif }
327
+ td.name {font-style: italic; font-size:80%; }
328
+ th { font-style: italic; font-size: 80%; background-color: lightgrey; }
329
+ td { vertical-align: top; }
330
+ ul { margin: 0px; margin-left: 1em; padding: 0px; }
331
+ table { width: 100%; border-collapse: collapse; }
332
+ .note { font-size:80%; }
333
+ .doc { margin: 0.5em; border: solid grey 1px; }
334
+ .exp { display: none; font-family: monospace; white-space: pre; }
335
+ ]]>
336
+ </style>
337
+ </xsl:template>
338
+ <xsl:template name="svg_ie_workaround">
339
+ <xsl:if test="system-property('xsl:vendor')='Microsoft'">
340
+ <object id="AdobeSVG" classid="clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"/>
341
+ <xsl:processing-instruction name="import">namespace="svg"
342
+ implementation="#AdobeSVG"</xsl:processing-instruction>
343
+ </xsl:if>
344
+ </xsl:template>
345
+ </xsl:stylesheet>