jberkel-solrium 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/LICENSE.txt +712 -0
  2. data/README.markdown +51 -0
  3. data/Rakefile +15 -0
  4. data/VERSION.yml +4 -0
  5. data/lib/jars/jetty/ant-1.6.5.jar +0 -0
  6. data/lib/jars/jetty/commons-codec-1.3.jar +0 -0
  7. data/lib/jars/jetty/commons-fileupload-1.2.jar +0 -0
  8. data/lib/jars/jetty/jetty-7.0.0.pre5.jar +0 -0
  9. data/lib/jars/jetty/jetty-util-7.0.0.pre5.jar +0 -0
  10. data/lib/jars/jetty/jsp-2.1.jar +0 -0
  11. data/lib/jars/jetty/jsp-api-2.1.jar +0 -0
  12. data/lib/jars/jetty/servlet-api-3.0.pre4.jar +0 -0
  13. data/lib/jars/lucene/lucene-analyzers-2.4-dev.jar +0 -0
  14. data/lib/jars/lucene/lucene-core-2.4-dev.jar +0 -0
  15. data/lib/jars/lucene/lucene-highlighter-2.4-dev.jar +0 -0
  16. data/lib/jars/lucene/lucene-memory-2.4-dev.jar +0 -0
  17. data/lib/jars/lucene/lucene-queries-2.4-dev.jar +0 -0
  18. data/lib/jars/lucene/lucene-snowball-2.4-dev.jar +0 -0
  19. data/lib/jars/lucene/lucene-spellchecker-2.4-dev.jar +0 -0
  20. data/lib/jars/solr/apache-solr-common-1.3.0.jar +0 -0
  21. data/lib/jars/solr/apache-solr-core-1.3.0.jar +0 -0
  22. data/lib/jars/solr/commons-io-1.2.jar +0 -0
  23. data/lib/jars/solr/stax-1.2.0-dev.jar +0 -0
  24. data/lib/jars/solr/stax-api-1.0.jar +0 -0
  25. data/lib/jars/solr/stax-utils.jar +0 -0
  26. data/lib/jars/solr/xpp3-1.1.3.4.O.jar +0 -0
  27. data/lib/jetty.rb +83 -0
  28. data/lib/lucene.rb +33 -0
  29. data/lib/queries.rb +60 -0
  30. data/lib/remote.rb +22 -0
  31. data/lib/solr.rb +48 -0
  32. data/lib/solr_ext.rb +59 -0
  33. data/lib/webapp/admin/_info.jsp +110 -0
  34. data/lib/webapp/admin/action.jsp +116 -0
  35. data/lib/webapp/admin/analysis.jsp +456 -0
  36. data/lib/webapp/admin/analysis.xsl +179 -0
  37. data/lib/webapp/admin/distributiondump.jsp +158 -0
  38. data/lib/webapp/admin/favicon.ico +0 -0
  39. data/lib/webapp/admin/form.jsp +129 -0
  40. data/lib/webapp/admin/get-file.jsp +72 -0
  41. data/lib/webapp/admin/get-properties.jsp +24 -0
  42. data/lib/webapp/admin/header.jsp +41 -0
  43. data/lib/webapp/admin/index.jsp +154 -0
  44. data/lib/webapp/admin/jquery-1.2.3.min.js +32 -0
  45. data/lib/webapp/admin/logging.jsp +50 -0
  46. data/lib/webapp/admin/logging.xsl +91 -0
  47. data/lib/webapp/admin/meta.xsl +34 -0
  48. data/lib/webapp/admin/ping.jsp +65 -0
  49. data/lib/webapp/admin/ping.xsl +71 -0
  50. data/lib/webapp/admin/raw-schema.jsp +38 -0
  51. data/lib/webapp/admin/registry.jsp +107 -0
  52. data/lib/webapp/admin/registry.xsl +287 -0
  53. data/lib/webapp/admin/schema.jsp +661 -0
  54. data/lib/webapp/admin/solr-admin.css +206 -0
  55. data/lib/webapp/admin/solr-head.gif +0 -0
  56. data/lib/webapp/admin/solr-head.png +0 -0
  57. data/lib/webapp/admin/solr-lowercase.gif +0 -0
  58. data/lib/webapp/admin/solr-lowercase.png +0 -0
  59. data/lib/webapp/admin/stats.jsp +94 -0
  60. data/lib/webapp/admin/stats.xsl +220 -0
  61. data/lib/webapp/admin/tabular.xsl +141 -0
  62. data/lib/webapp/admin/threaddump.jsp +110 -0
  63. data/lib/webapp/admin/threaddump.xsl +103 -0
  64. data/lib/webapp/favicon.ico +0 -0
  65. data/lib/webapp/index.jsp +42 -0
  66. metadata +118 -0
@@ -0,0 +1,206 @@
1
+ /**
2
+ * Licensed to the Apache Software Foundation (ASF) under one or more
3
+ * contributor license agreements. See the NOTICE file distributed with
4
+ * this work for additional information regarding copyright ownership.
5
+ * The ASF licenses this file to You under the Apache License, Version 2.0
6
+ * (the "License"); you may not use this file except in compliance with
7
+ * the License. You may obtain a copy of the License at
8
+ *
9
+ * http://www.apache.org/licenses/LICENSE-2.0
10
+ *
11
+ * Unless required by applicable law or agreed to in writing, software
12
+ * distributed under the License is distributed on an "AS IS" BASIS,
13
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ * See the License for the specific language governing permissions and
15
+ * limitations under the License.
16
+ */
17
+
18
+ h1, h2, h3, h4, h5 {
19
+ display: block;
20
+ font-family: ITC Officina Sans Book, Terminator Two, Helvetica, Arial, sans-serif;
21
+ font-style: bold;
22
+ margin: 0;
23
+ }
24
+
25
+ strong {
26
+ font-family: ITC Officina Sans Book, Terminator Two, Helvetica, Arial, sans-serif;
27
+ font-style: bold;
28
+ margin: 0;
29
+ }
30
+
31
+ input.std, textarea.std {
32
+ color: black;
33
+ border: 2px inset #ff9933;
34
+ background-color: #ffffff;
35
+ width:450px;
36
+ max-width:450px;
37
+ }
38
+
39
+ input.stdbutton {
40
+ font-family: ITC Officina Sans Book, Helvetica, Arial, sans-serif;
41
+ font-style: bold;
42
+ font-size: 11;
43
+ text-transform: capitalize;
44
+ color: black;
45
+ background-color: #dddddd;
46
+ border: groove #ff9933;
47
+ }
48
+
49
+ input.stdbutton:hover {
50
+ color: #0000ff;
51
+ border: groove #0000ff;
52
+ }
53
+
54
+
55
+ body {
56
+ background-color: #bbbbbb;
57
+ }
58
+
59
+ table {
60
+ display: table;
61
+ background-color: #FAF7E4;
62
+ width: 100%;
63
+ border-top: 4px solid #666666;
64
+ border-left: 2px solid #666666;
65
+ text-align: left;
66
+ vertical-align: top;
67
+ cellpadding-right: 8px;
68
+ }
69
+
70
+ table.responseHeader, table.analysis {
71
+ width: auto;
72
+ }
73
+
74
+ table {
75
+ border-collapse: collapse
76
+ }
77
+
78
+ tr > td:first-child {
79
+ width: 30%;
80
+ }
81
+
82
+ td.debugdata, td.highlight, td.responseHeader {
83
+ width: auto;
84
+ }
85
+
86
+ td.highlight {
87
+ background: #ccccff;
88
+ }
89
+
90
+ td.responseHeader {
91
+ width: auto;
92
+ text-align: right;
93
+ }
94
+
95
+ td.responseHeader + td {
96
+ text-align: left;
97
+ font-family: Courier;
98
+ }
99
+
100
+
101
+ th, td {
102
+ text-align: left;
103
+ vertical-align: top;
104
+ border-bottom: 1px solid #ff9933;
105
+ }
106
+
107
+ a {
108
+ text-decoration: none;
109
+ font-weight: bold;
110
+ font-size: 11px;
111
+ background: #FAF7E4;
112
+ text-transform: uppercase;
113
+ }
114
+
115
+ a:link {
116
+ color: #0000aa;
117
+ }
118
+
119
+ a:visited {
120
+ color: #0000ff;
121
+ }
122
+
123
+ a:active {
124
+ color: #4444ff;
125
+ }
126
+
127
+ a:hover {
128
+ color: #0000ff;
129
+ background: #ccccff;
130
+ }
131
+
132
+ a:offsite {
133
+ color: #0000aa;
134
+ }
135
+
136
+ table.analysis th, table.analysis td {
137
+ border-right:1px solid black;
138
+ }
139
+
140
+ /**
141
+ * styles for the schema browser
142
+ */
143
+
144
+ table.topTerms {
145
+ width: 450px;
146
+ }
147
+
148
+ table.histogram {
149
+ vertical-align: bottom;
150
+ }
151
+
152
+ table.histogram td, table.histogram th {
153
+ text-align: center;
154
+ vertical-align: bottom;
155
+ border-bottom: 1px solid #ff9933;
156
+ width: auto;
157
+ }
158
+
159
+ #menu {
160
+ background-color: #FAF7E4;
161
+ height:100%;
162
+ min-height:100%;
163
+ width:140px;
164
+ float:left;
165
+ margin-right:20px
166
+ }
167
+ #menu h3 {
168
+ padding-left:10px;
169
+ }
170
+ #menu ul {
171
+ list-style: none;
172
+ text-align: right;
173
+ margin: 0;
174
+ padding: 0
175
+ }
176
+ #menu li.header {
177
+ text-align: left;
178
+ }
179
+ #menu li {
180
+ border: 1px solid #ff9933;
181
+ margin: 0
182
+ }
183
+ #menu li a {
184
+ display:block;
185
+ }
186
+ #menu li.selected a {
187
+ background-color: #ccccff
188
+ }
189
+ #menu a:hover {
190
+ background: #ccccff
191
+ }
192
+
193
+ #schemaTop {
194
+ border-bottom:1px black solid;
195
+ }
196
+
197
+ #content {
198
+ margin-left: 160px;
199
+ }
200
+ #topTerms {
201
+ float:left;
202
+ margin-right:40px;
203
+ }
204
+ div.analyzer {
205
+ margin-left:20px;
206
+ }
@@ -0,0 +1,94 @@
1
+ <%@ page contentType="text/xml; charset=utf-8" pageEncoding="UTF-8" language="java" %>
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
+ <%@ page import="org.apache.solr.core.SolrInfoMBean,
19
+ org.apache.solr.core.SolrInfoRegistry,
20
+ org.apache.solr.common.util.NamedList,
21
+ java.util.Date,
22
+ java.util.Map"%>
23
+ <?xml-stylesheet type="text/xsl" href="stats.xsl"?>
24
+ <%@include file="_info.jsp" %>
25
+
26
+
27
+ <solr>
28
+ <%
29
+ if (core.getName() != null) { %>
30
+ <core><%=core.getName()%></core>
31
+ <% } %>
32
+ <schema><%= collectionName %></schema>
33
+ <host><%= hostname %></host>
34
+ <now><%= new Date().toString() %></now>
35
+ <start><%= new Date(core.getStartTime()) %></start>
36
+ <solr-info>
37
+ <%
38
+ for (SolrInfoMBean.Category cat : SolrInfoMBean.Category.values()) {
39
+ %>
40
+ <<%= cat.toString() %>>
41
+ <%
42
+ Map<String,SolrInfoMBean> reg = core.getInfoRegistry();
43
+ synchronized(reg) {
44
+ for (Map.Entry<String,SolrInfoMBean> entry : reg.entrySet()) {
45
+ String key = entry.getKey();
46
+ SolrInfoMBean m = entry.getValue();
47
+
48
+ if (m.getCategory() != cat) continue;
49
+
50
+ NamedList nl = m.getStatistics();
51
+ if ((nl != null) && (nl.size() != 0)) {
52
+ String na = "None Provided";
53
+ String name = (m.getName()!=null ? m.getName() : na);
54
+ String vers = (m.getVersion()!=null ? m.getVersion() : na);
55
+ String desc = (m.getDescription()!=null ? m.getDescription() : na);
56
+ %>
57
+ <entry>
58
+ <name>
59
+ <%= key %>
60
+ </name>
61
+ <class>
62
+ <%= name %>
63
+ </class>
64
+ <version>
65
+ <%= vers %>
66
+ </version>
67
+ <description>
68
+ <%= desc %>
69
+ </description>
70
+ <stats>
71
+ <%
72
+ for (int i = 0; i < nl.size() ; i++) {
73
+ %>
74
+ <stat name="<%= nl.getName(i) %>" >
75
+ <%= nl.getVal(i).toString() %>
76
+ </stat>
77
+ <%
78
+ }
79
+ %>
80
+ </stats>
81
+ </entry>
82
+ <%
83
+ }
84
+ %>
85
+ <%
86
+ }
87
+ }
88
+ %>
89
+ </<%= cat.toString() %>>
90
+ <%
91
+ }
92
+ %>
93
+ </solr-info>
94
+ </solr>
@@ -0,0 +1,220 @@
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
+ <!-- $Id: stats.xsl 673168 2008-07-01 18:41:41Z hossman $ -->
19
+ <!-- $URL: http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.3.0/src/webapp/web/admin/stats.xsl $ -->
20
+
21
+ <xsl:stylesheet
22
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
23
+ version="1.0">
24
+
25
+
26
+ <xsl:output
27
+ method="html"
28
+ encoding="utf-8"
29
+ media-type="text/html; charset=UTF-8"
30
+ indent="yes"
31
+ doctype-public="-//W3C//DTD HTML 4.01//EN"
32
+ doctype-system="http://www.w3.org/TR/html4/strict.dtd" />
33
+
34
+
35
+ <xsl:template match="/">
36
+ <xsl:variable name="title">
37
+ <!-- no whitespace before the colon -->
38
+ Solr Statistics<xsl:if test="solr/core">:
39
+ <xsl:value-of select="solr/core"/>
40
+ </xsl:if>
41
+ (<xsl:value-of select="solr/schema" />)
42
+ </xsl:variable>
43
+ <html>
44
+ <head>
45
+ <link rel="stylesheet" type="text/css" href="solr-admin.css"></link>
46
+ <link rel="icon" href="favicon.ico" type="image/ico"></link>
47
+ <link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
48
+ <title><xsl:value-of select="$title"/></title>
49
+ </head>
50
+ <body>
51
+ <a href=".">
52
+ <img border="0" align="right" height="61" width="142" src="solr-head.gif" alt="SOLR">
53
+ </img>
54
+ </a>
55
+ <h1><xsl:value-of select="$title"/></h1>
56
+ <xsl:value-of select="solr/host" />
57
+ <br clear="all" />
58
+ <xsl:apply-templates/>
59
+ <br /><br />
60
+ <a href=".">Return to Admin Page</a>
61
+ </body>
62
+ </html>
63
+ </xsl:template>
64
+
65
+ <xsl:template match="solr">
66
+ <table>
67
+ <tr>
68
+ <td>
69
+ <H3>Category</H3>
70
+ </td>
71
+ <td>
72
+ [<a href="#core">Core</a>]
73
+ [<a href="#cache">Cache</a>]
74
+ [<a href="#query">Query</a>]
75
+ [<a href="#update">Update</a>]
76
+ [<a href="#highlight">Highlighting</a>]
77
+ [<a href="#other">Other</a>]
78
+ </td>
79
+ </tr>
80
+ <tr>
81
+ <td>
82
+ </td>
83
+ <td>
84
+ Current Time: <xsl:value-of select="now" />
85
+ </td>
86
+ </tr>
87
+ <tr>
88
+ <td>
89
+ </td>
90
+ <td>
91
+ Server Start Time: <xsl:value-of select="start" />
92
+ </td>
93
+ </tr>
94
+ <xsl:apply-templates select="*" mode="header" />
95
+ </table>
96
+ <xsl:apply-templates select="solr-info" mode="main" />
97
+ </xsl:template>
98
+
99
+ <!-- catch all in case new header info gets added to XML -->
100
+ <xsl:template match="solr/*" mode="header" priority="-10">
101
+ <tr>
102
+ <td>
103
+ </td>
104
+ <td>
105
+ <xsl:value-of select="local-name()" />: <xsl:value-of select="text()" />
106
+ </td>
107
+ </tr>
108
+ </xsl:template>
109
+
110
+ <!-- things we've already explicitly taken care of -->
111
+ <xsl:template match="solr/schema" mode="header" />
112
+ <xsl:template match="solr/core" mode="header" />
113
+ <xsl:template match="solr/host" mode="header" />
114
+ <xsl:template match="solr/now" mode="header" />
115
+ <xsl:template match="solr/start" mode="header" />
116
+ <xsl:template match="solr/solr-info" mode="header" />
117
+
118
+ <xsl:template match="solr/solr-info" mode="main">
119
+ <xsl:apply-templates/>
120
+ </xsl:template>
121
+
122
+ <xsl:template match="solr/solr-info/*">
123
+ <br />
124
+ <xsl:apply-templates select="." mode="sub-header" />
125
+ <table>
126
+ <tr>
127
+ <td align="right">
128
+ &#xa0;
129
+ </td>
130
+ <td>
131
+ </td>
132
+ </tr>
133
+ <xsl:apply-templates/>
134
+ </table>
135
+ </xsl:template>
136
+
137
+ <xsl:template match="solr/solr-info/CORE" mode="sub-header">
138
+ <a name="core"><h2>Core</h2></a>
139
+ </xsl:template>
140
+
141
+ <xsl:template match="solr/solr-info/CACHE" mode="sub-header">
142
+ <a name="cache"><h2>Cache</h2></a>
143
+ </xsl:template>
144
+
145
+ <xsl:template match="solr/solr-info/QUERYHANDLER" mode="sub-header">
146
+ <a name="query"><h2>Query Handlers</h2></a>
147
+ </xsl:template>
148
+
149
+ <xsl:template match="solr/solr-info/UPDATEHANDLER" mode="sub-header">
150
+ <a name="update"><h2>Update Handlers</h2></a>
151
+ </xsl:template>
152
+
153
+ <xsl:template match="solr/solr-info/HIGHLIGHTING" mode="sub-header">
154
+ <a name="highlight"><h2>Highlighting</h2></a>
155
+ </xsl:template>
156
+
157
+ <!-- catch all for new types of plugins -->
158
+ <xsl:template match="solr/solr-info/*" mode="sub-header" priority="-10">
159
+ <h2><xsl:value-of select="local-name()"/></h2>
160
+ </xsl:template>
161
+
162
+ <xsl:template match="solr/solr-info/OTHER" mode="sub-header">
163
+ <a name="other"><h2>Other</h2></a>
164
+ </xsl:template>
165
+
166
+ <xsl:template match="solr/solr-info/*/entry">
167
+ <tr>
168
+ <td align="right">
169
+ <strong>name:&#xa0;</strong>
170
+ </td>
171
+ <td>
172
+ <tt><xsl:value-of select="name"/>&#xa0;</tt>
173
+ </td>
174
+ </tr>
175
+ <tr>
176
+ <td align="right">
177
+ <strong>class:&#xa0;</strong>
178
+ </td>
179
+ <td>
180
+ <tt><xsl:value-of select="class"/>&#xa0;</tt>
181
+ </td>
182
+ </tr>
183
+ <tr>
184
+ <td align="right">
185
+ <strong>version:&#xa0;</strong>
186
+ </td>
187
+ <td>
188
+ <tt><xsl:value-of select="version"/>&#xa0;</tt>
189
+ </td>
190
+ </tr>
191
+ <tr>
192
+ <td align="right">
193
+ <strong>description:&#xa0;</strong>
194
+ </td>
195
+ <td>
196
+ <tt><xsl:value-of select="description"/>&#xa0;</tt>
197
+ </td>
198
+ </tr>
199
+ <tr>
200
+ <td align="right">
201
+ <strong>stats:&#xa0;</strong>
202
+ </td>
203
+ <td>
204
+ <xsl:for-each select="stats/stat[@name]">
205
+ <xsl:value-of select="@name"/>
206
+ <xsl:text> : </xsl:text>
207
+ <xsl:variable name="name" select="@name" />
208
+ <xsl:value-of select="." /><br />
209
+ </xsl:for-each>
210
+ </td>
211
+ </tr>
212
+ <tr>
213
+ <td align="right">
214
+ </td>
215
+ <td>
216
+ </td>
217
+ </tr>
218
+ </xsl:template>
219
+
220
+ </xsl:stylesheet>