rjack-solr 3.6.0.0-java

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/History.rdoc +2 -0
  2. data/Manifest.txt +62 -0
  3. data/NOTICE.txt +7 -0
  4. data/README.rdoc +71 -0
  5. data/Rakefile +12 -0
  6. data/assembly.xml +20 -0
  7. data/bin/rjack-solr-fg +53 -0
  8. data/config/config.rb +9 -0
  9. data/init/rjack-solr +44 -0
  10. data/lib/rjack-solr.rb +30 -0
  11. data/lib/rjack-solr/base.rb +28 -0
  12. data/lib/rjack-solr/commons-fileupload-1.2.1.jar +0 -0
  13. data/lib/rjack-solr/commons-io-2.1.jar +0 -0
  14. data/lib/rjack-solr/commons-lang-2.6.jar +0 -0
  15. data/lib/rjack-solr/config.rb +24 -0
  16. data/lib/rjack-solr/server.rb +70 -0
  17. data/lib/rjack-solr/solr-core-3.6.0.jar +0 -0
  18. data/lib/rjack-solr/solr-solrj-3.6.0.jar +0 -0
  19. data/pom.xml +96 -0
  20. data/test/test_solr.rb +43 -0
  21. data/webapp/META-INF/LICENSE.txt +1166 -0
  22. data/webapp/META-INF/MANIFEST.MF +13 -0
  23. data/webapp/META-INF/NOTICE.txt +438 -0
  24. data/webapp/WEB-INF/web.xml +153 -0
  25. data/webapp/WEB-INF/weblogic.xml +12 -0
  26. data/webapp/admin/_info.jsp +120 -0
  27. data/webapp/admin/action.jsp +94 -0
  28. data/webapp/admin/analysis.jsp +496 -0
  29. data/webapp/admin/analysis.xsl +179 -0
  30. data/webapp/admin/dataimport.jsp +53 -0
  31. data/webapp/admin/debug.jsp +103 -0
  32. data/webapp/admin/distributiondump.jsp +160 -0
  33. data/webapp/admin/favicon.ico +0 -0
  34. data/webapp/admin/form.jsp +152 -0
  35. data/webapp/admin/get-file.jsp +72 -0
  36. data/webapp/admin/get-properties.jsp +24 -0
  37. data/webapp/admin/header.jsp +44 -0
  38. data/webapp/admin/index.jsp +162 -0
  39. data/webapp/admin/jquery-1.4.3.min.js +166 -0
  40. data/webapp/admin/meta.xsl +34 -0
  41. data/webapp/admin/ping.jsp +52 -0
  42. data/webapp/admin/ping.xsl +71 -0
  43. data/webapp/admin/raw-schema.jsp +38 -0
  44. data/webapp/admin/registry.jsp +107 -0
  45. data/webapp/admin/registry.xsl +321 -0
  46. data/webapp/admin/replication/header.jsp +89 -0
  47. data/webapp/admin/replication/index.jsp +378 -0
  48. data/webapp/admin/schema.jsp +690 -0
  49. data/webapp/admin/solr-admin.css +215 -0
  50. data/webapp/admin/solr_small.png +0 -0
  51. data/webapp/admin/stats.jsp +92 -0
  52. data/webapp/admin/stats.xsl +220 -0
  53. data/webapp/admin/tabular.xsl +141 -0
  54. data/webapp/admin/threaddump.jsp +110 -0
  55. data/webapp/admin/threaddump.xsl +103 -0
  56. data/webapp/favicon.ico +0 -0
  57. data/webapp/index.jsp +49 -0
  58. metadata +217 -0
Binary file
@@ -0,0 +1,152 @@
1
+ <%@ page contentType="text/html; charset=utf-8" pageEncoding="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
+ <%@include file="header.jsp" %>
19
+ <script>
20
+ function onQueryFormSubmit() {
21
+ if (queryForm.q.value.length==0) {
22
+ alert('no empty queries, please');
23
+ return false;
24
+ }
25
+ var qtDom = queryForm.qt;
26
+ var qt = qtDom.value;
27
+ if (qt[0] == "/") {
28
+ queryForm.action = ".."+qt;
29
+ qtDom.setAttribute("name","");//prevent submission (kind of a hack)
30
+ }
31
+ return true;
32
+ }
33
+ </script>
34
+ <br clear="all">
35
+ <form name="queryForm" method="GET" action="../select" accept-charset="UTF-8" onSubmit="return onQueryFormSubmit()">
36
+ <!-- these are good defaults to have if people bookmark the resulting
37
+ URLs, but they should not show up in the form since they are very
38
+ output type specific.
39
+ -->
40
+ <input name="indent" type="hidden" value="on">
41
+ <input name="version" type="hidden" value="2.2">
42
+
43
+ <table>
44
+ <tr>
45
+ <td>
46
+ <strong>Request Handler</strong>
47
+ </td>
48
+ <td>
49
+ <!-- Note: look at the onSubmit handler which treats this input specially -->
50
+ <input name="qt" type="text" value="/select">
51
+ </td>
52
+ </tr>
53
+ <tr>
54
+ <td>
55
+ <strong>Query String</strong>
56
+ </td>
57
+ <td>
58
+ <textarea rows="5" cols="60" name="q"><%= defaultSearch %></textarea>
59
+ </td>
60
+ </tr>
61
+ <tr>
62
+ <td>
63
+ <strong>Filter Query</strong>
64
+ </td>
65
+ <td>
66
+ <textarea rows="2" cols="60" name="fq"></textarea>
67
+ </td>
68
+ </tr>
69
+ <tr>
70
+ <td>
71
+ <strong>Start Row</strong>
72
+ </td>
73
+ <td>
74
+ <input name="start" type="text" value="0">
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td>
79
+ <strong>Maximum Rows Returned</strong>
80
+ </td>
81
+ <td>
82
+ <input name="rows" type="text" value="10">
83
+ </td>
84
+ </tr>
85
+ <tr>
86
+ <td>
87
+ <strong>Fields to Return</strong>
88
+ </td>
89
+ <td>
90
+ <input name="fl" type="text" value="*,score">
91
+ </td>
92
+ </tr>
93
+ <tr>
94
+ <td>
95
+ <strong>Output Type</strong>
96
+ </td>
97
+ <td>
98
+ <input name="wt" type="text" value="">
99
+ </td>
100
+ </tr>
101
+ <tr>
102
+ <td>
103
+ <strong>Debug: enable</strong>
104
+ </td>
105
+ <td>
106
+ <input name="debugQuery" type="checkbox" >
107
+ <em><font size="-1"> Note: you may need to "view source" in your browser to see explain() correctly indented.</font></em>
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <td>
112
+ <strong>Debug: explain others</strong>
113
+ </td>
114
+ <td>
115
+ <input name="explainOther" type="text" >
116
+ <em><font size="-1"> Apply original query scoring to matches of this query to see how they compare.</font></em>
117
+ </td>
118
+ </tr>
119
+ <tr>
120
+ <td>
121
+ <strong>Enable Highlighting</strong>
122
+ </td>
123
+ <td>
124
+ <input name="hl" type="checkbox" >
125
+ </td>
126
+ </tr>
127
+ <tr>
128
+ <td>
129
+ <strong>Fields to Highlight</strong>
130
+ </td>
131
+ <td>
132
+ <input name="hl.fl" type="text" >
133
+ </td>
134
+ </tr>
135
+ <tr>
136
+ <td>
137
+ </td>
138
+ <td>
139
+ <input class="stdbutton" type="submit" value="search">
140
+ </td>
141
+ </tr>
142
+ </table>
143
+ </form>
144
+ <br clear="all">
145
+ <em>
146
+ This form demonstrates the most common query options available for the
147
+ built in Query Types. Please consult the Solr Wiki for additional
148
+ Query Parameters.
149
+ </em>
150
+
151
+ </body>
152
+ </html>
@@ -0,0 +1,72 @@
1
+ <%@ page contentType="text/plain; charset=utf-8" pageEncoding="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
+ <%@ page import="org.apache.solr.core.Config,
19
+ org.apache.solr.core.SolrCore,
20
+ org.apache.solr.core.SolrConfig,
21
+ java.io.InputStream,
22
+ java.io.InputStreamReader,
23
+ java.io.Reader,
24
+ java.util.StringTokenizer,
25
+ java.util.logging.Logger"%>
26
+ <%!
27
+ static Logger log = Logger.getLogger(SolrCore.class.getName());
28
+ %>
29
+ <%
30
+ // NOTE -- this file will be removed in a future release
31
+ log.warning("Using deprecated JSP: " + request.getRequestURL().append("?").append(request.getQueryString()) + " -- check the ShowFileRequestHandler" );
32
+
33
+ Object ocore = request.getAttribute("org.apache.solr.SolrCore");
34
+ SolrCore core = ocore instanceof SolrCore? (SolrCore) ocore : SolrCore.getSolrCore();
35
+ String fname = request.getParameter("file");
36
+ String optional = request.getParameter("optional");
37
+ String gettableFiles = core.getSolrConfig().get("admin/gettableFiles","");
38
+ StringTokenizer st = new StringTokenizer(gettableFiles);
39
+ InputStream is;
40
+ boolean isValid = false;
41
+ boolean isOptional = false;
42
+ if (fname != null) {
43
+ // Validate fname
44
+ while(st.hasMoreTokens()) {
45
+ if (st.nextToken().compareTo(fname) == 0) isValid = true;
46
+ }
47
+ }
48
+ if (optional!=null && optional.equalsIgnoreCase("y")) {
49
+ isOptional=true;
50
+ }
51
+ if (isValid) {
52
+ try {
53
+ is= core.getSolrConfig().openResource(fname);
54
+ Reader input = new InputStreamReader(is);
55
+ char[] buf = new char[4096];
56
+ while (true) {
57
+ int len = input.read(buf);
58
+ if (len<=0) break;
59
+ out.write(buf,0,len);
60
+ }
61
+ }
62
+ catch (RuntimeException re) {
63
+ if (!isOptional) {
64
+ throw re;
65
+ }
66
+ }
67
+ } else {
68
+ out.println("<ERROR>");
69
+ out.println("Permission denied for file "+ fname);
70
+ out.println("</ERROR>");
71
+ }
72
+ %>
@@ -0,0 +1,24 @@
1
+ <%@ page contentType="text/plain;charset=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
+ <%
19
+ java.util.Enumeration e = System.getProperties().propertyNames();
20
+ while(e.hasMoreElements()) {
21
+ String prop = (String)e.nextElement();
22
+ out.println(prop + " = " + System.getProperty(prop));
23
+ }
24
+ %>
@@ -0,0 +1,44 @@
1
+ <%@ page contentType="text/html; charset=utf-8" pageEncoding="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
+ <html>
19
+ <head>
20
+ <%
21
+ request.setCharacterEncoding("UTF-8");
22
+ %>
23
+ <%@include file="_info.jsp" %>
24
+ <script>
25
+ var host_name="<%= hostname %>"
26
+ </script>
27
+
28
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
29
+ <link rel="stylesheet" type="text/css" href="solr-admin.css">
30
+ <link rel="icon" href="favicon.ico" type="image/ico"></link>
31
+ <link rel="shortcut icon" href="favicon.ico" type="image/ico"></link>
32
+ <title>Solr admin page</title>
33
+ </head>
34
+
35
+ <body>
36
+ <a href="."><img border="0" align="right" height="78" width="142" src="solr_small.png" alt="Solr"></a>
37
+ <h1>Solr Admin (<%= collectionName %>)
38
+ <%= enabledStatus==null ? "" : (isEnabled ? " - Enabled" : " - Disabled") %> </h1>
39
+
40
+ <%= hostname %>:<%= port %><br/>
41
+ cwd=<%= cwd %> SolrHome=<%= solrHome %>
42
+ <br/>
43
+ <%String cachingStatus = " HTTP caching is "; %>
44
+ <%= cachingEnabled ? cachingStatus + " ON": cachingStatus + " OFF" %>
@@ -0,0 +1,162 @@
1
+ <%@ page contentType="text/html; charset=utf-8" pageEncoding="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
+ <%-- $Id: index.jsp 1089340 2011-04-06 07:49:14Z uschindler $ --%>
20
+ <%-- $Source: /cvs/main/searching/SolrServer/resources/admin/index.jsp,v $ --%>
21
+ <%-- $Name: $ --%>
22
+
23
+ <%@ page import="java.util.Date" %>
24
+ <%@ page import="java.util.List" %>
25
+ <%@ page import="java.util.Collection" %>
26
+ <%@ page import="org.apache.solr.request.SolrRequestHandler"%>
27
+ <%@ page import="org.apache.solr.handler.ReplicationHandler" %>
28
+
29
+ <%-- jsp:include page="header.jsp"/ --%>
30
+ <%-- do a verbatim include so we can use the local vars --%>
31
+ <%@include file="header.jsp" %>
32
+ <%boolean replicationhandler = !core.getRequestHandlers(ReplicationHandler.class).isEmpty();%>
33
+ <br clear="all">
34
+ <table>
35
+
36
+ <tr>
37
+ <td>
38
+ <h3>Solr</h3>
39
+ </td>
40
+ <td>
41
+ <% if (null != core.getSchemaResource()) { %>
42
+ [<a href="file/?contentType=text/xml;charset=utf-8&file=<%=core.getSchemaResource()%>">Schema</a>]
43
+ <% }
44
+ if (null != core.getConfigResource()) { %>
45
+ [<a href="file/?contentType=text/xml;charset=utf-8&file=<%=core.getConfigResource()%>">Config</a>]
46
+ <% } %>
47
+ [<a href="analysis.jsp?highlight=on">Analysis</a>]
48
+ [<a href="schema.jsp">Schema Browser</a>] <%if(replicationhandler){%>[<a href="replication/index.jsp">Replication</a>]<%}%>
49
+ <br>
50
+ [<a href="stats.jsp">Statistics</a>]
51
+ [<a href="registry.jsp">Info</a>]
52
+ [<a href="distributiondump.jsp">Distribution</a>]
53
+ [<a href="ping">Ping</a>]
54
+ [<a href="logging">Logging</a>]
55
+ </td>
56
+ </tr>
57
+
58
+ <%-- List the cores (that arent this one) so we can switch --%>
59
+ <% org.apache.solr.core.CoreContainer cores = (org.apache.solr.core.CoreContainer)request.getAttribute("org.apache.solr.CoreContainer");
60
+ if (cores!=null) {
61
+ Collection<String> names = cores.getCoreNames();
62
+ if (names.size() > 1) {%><tr><td><strong>Cores:</strong><br></td><td><%
63
+ String url = request.getContextPath();
64
+ for (String name : names) {
65
+ String lname = name.length()==0 ? cores.getDefaultCoreName() : name; // use the real core name rather than the default
66
+ if(name.equals(core.getName())) {
67
+ %>[<%=lname%>]<%
68
+ } else {
69
+ %>[<a href="<%=url%>/<%=lname%>/admin/"><%=lname%></a>]<%
70
+ }
71
+ }%></td></tr><%
72
+ }}%>
73
+
74
+ <tr>
75
+ <td>
76
+ <strong>App server:</strong><br>
77
+ </td>
78
+ <td>
79
+ [<a href="get-properties.jsp">Java Properties</a>]
80
+ [<a href="threaddump.jsp">Thread Dump</a>]
81
+ <%
82
+ if (enabledFile!=null)
83
+ if (isEnabled) {
84
+ %>
85
+ [<a href="action.jsp?action=Disable">Disable</a>]
86
+ <%
87
+ } else {
88
+ %>
89
+ [<a href="action.jsp?action=Enable">Enable</a>]
90
+ <%
91
+ }
92
+ %>
93
+ </td>
94
+ </tr>
95
+
96
+
97
+ <%
98
+ // a quick hack to get rid of get-file.jsp -- note this still spits out invalid HTML
99
+ out.write( org.apache.solr.handler.admin.ShowFileRequestHandler.getFileContents( "admin-extra.html" ) );
100
+ %>
101
+
102
+ </table><P>
103
+
104
+
105
+ <table>
106
+ <tr>
107
+ <td>
108
+ <h3>Make a Query</h3>
109
+ </td>
110
+ <td>
111
+ [<a href="form.jsp">Full Interface</a>]
112
+ </td>
113
+
114
+ </tr>
115
+ <tr>
116
+ <td>
117
+ Query String:
118
+ </td>
119
+ <td colspan=2>
120
+ <form name=queryForm method="GET" action="../select/" accept-charset="UTF-8">
121
+ <textarea class="std" rows="4" cols="40" name="q"><%= defaultSearch %></textarea>
122
+ <input name="version" type="hidden" value="2.2">
123
+ <input name="start" type="hidden" value="0">
124
+ <input name="rows" type="hidden" value="10">
125
+ <input name="indent" type="hidden" value="on">
126
+ <br><input class="stdbutton" type="submit" value="search"
127
+ onclick="if (queryForm.q.value.length==0) { alert('no empty queries, please'); return false; } else { queryForm.submit(); return false;} ">
128
+ </form>
129
+ </td>
130
+ </tr>
131
+ </table><p>
132
+
133
+ <table>
134
+ <tr>
135
+ <td>
136
+ <h3>Assistance</h3>
137
+ </td>
138
+ <td>
139
+ [<a href="http://lucene.apache.org/solr/">Documentation</a>]
140
+ [<a href="http://issues.apache.org/jira/browse/SOLR">Issue Tracker</a>]
141
+ [<a href="mailto:solr-user@lucene.apache.org">Send Email</a>]
142
+ <br>
143
+ [<a href="http://wiki.apache.org/solr/SolrQuerySyntax">Solr Query Syntax</a>]
144
+ </td>
145
+ </tr>
146
+ <tr>
147
+ <td>
148
+ </td>
149
+ <td>
150
+ Current Time: <%= new Date() %>
151
+ </td>
152
+ </tr>
153
+ <tr>
154
+ <td>
155
+ </td>
156
+ <td>
157
+ Server Start At: <%= new Date(core.getStartTime()) %>
158
+ </td>
159
+ </tr>
160
+ </table>
161
+ </body>
162
+ </html>