rjack-solr 3.6.0.0-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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
data/History.rdoc ADDED
@@ -0,0 +1,2 @@
1
+ === 3.6.0.0 (2012-7-16)
2
+ * Initial release based on Solr 3.6.0
data/Manifest.txt ADDED
@@ -0,0 +1,62 @@
1
+ History.rdoc
2
+ Manifest.txt
3
+ NOTICE.txt
4
+ README.rdoc
5
+ Rakefile
6
+ assembly.xml
7
+ pom.xml
8
+ bin/rjack-solr-fg
9
+ config/config.rb
10
+ init/rjack-solr
11
+ lib/rjack-solr/base.rb
12
+ lib/rjack-solr.rb
13
+ lib/rjack-solr/config.rb
14
+ lib/rjack-solr/server.rb
15
+ test/test_solr.rb
16
+ webapp/META-INF
17
+ webapp/META-INF/LICENSE.txt
18
+ webapp/META-INF/MANIFEST.MF
19
+ webapp/META-INF/NOTICE.txt
20
+ webapp/WEB-INF
21
+ webapp/WEB-INF/lib
22
+ webapp/WEB-INF/web.xml
23
+ webapp/WEB-INF/weblogic.xml
24
+ webapp/admin
25
+ webapp/admin/_info.jsp
26
+ webapp/admin/action.jsp
27
+ webapp/admin/analysis.jsp
28
+ webapp/admin/analysis.xsl
29
+ webapp/admin/dataimport.jsp
30
+ webapp/admin/debug.jsp
31
+ webapp/admin/distributiondump.jsp
32
+ webapp/admin/favicon.ico
33
+ webapp/admin/form.jsp
34
+ webapp/admin/get-file.jsp
35
+ webapp/admin/get-properties.jsp
36
+ webapp/admin/header.jsp
37
+ webapp/admin/index.jsp
38
+ webapp/admin/jquery-1.4.3.min.js
39
+ webapp/admin/meta.xsl
40
+ webapp/admin/ping.jsp
41
+ webapp/admin/ping.xsl
42
+ webapp/admin/raw-schema.jsp
43
+ webapp/admin/registry.jsp
44
+ webapp/admin/registry.xsl
45
+ webapp/admin/replication
46
+ webapp/admin/replication/header.jsp
47
+ webapp/admin/replication/index.jsp
48
+ webapp/admin/schema.jsp
49
+ webapp/admin/solr-admin.css
50
+ webapp/admin/solr_small.png
51
+ webapp/admin/stats.jsp
52
+ webapp/admin/stats.xsl
53
+ webapp/admin/tabular.xsl
54
+ webapp/admin/threaddump.jsp
55
+ webapp/admin/threaddump.xsl
56
+ webapp/favicon.ico
57
+ webapp/index.jsp
58
+ lib/rjack-solr/commons-fileupload-1.2.1.jar
59
+ lib/rjack-solr/commons-io-2.1.jar
60
+ lib/rjack-solr/commons-lang-2.6.jar
61
+ lib/rjack-solr/solr-core-3.6.0.jar
62
+ lib/rjack-solr/solr-solrj-3.6.0.jar
data/NOTICE.txt ADDED
@@ -0,0 +1,7 @@
1
+ rjack-solr gem
2
+ Copyright (c) 2012 David Kellum
3
+
4
+ This product includes software developed by:
5
+
6
+ Apache Solr
7
+ Copyright (c) 2012 The Apache Software Foundation.
data/README.rdoc ADDED
@@ -0,0 +1,71 @@
1
+ = rjack-solr
2
+
3
+ * http://rjack.rubyforge.org/solr
4
+ * http://rjack.rubyforge.org
5
+ * https://github.com/dekellum/rjack
6
+
7
+ == Description
8
+
9
+ A gem packaging of {Solr}[http://lucene.apache.org/solr].
10
+
11
+ == Synopsis
12
+
13
+ Solr is run as a service on Jetty 7.x, and defaults to finding its
14
+ conf/ and data/ directories under the current working directory. To
15
+ get started, you can use the SOLR release's sample config:
16
+
17
+ % mkdir -p /opt/var/rjack-solr
18
+ % cd /opt/var/rjack-solr
19
+ % svn checkout http://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_3_6_0/solr/example/solr/conf
20
+
21
+ # Edit conf/schema.xml and remove/comment out the text_ja fieldType
22
+ # The Kuromoji Japanese Morphological is not included in
23
+ # rjack-lucene, due to size.
24
+
25
+ % jgem install rjack-solr
26
+ % rjack-solr-fg
27
+
28
+ You can also include a config.rb for the Jetty HTTP server details, i.e:
29
+
30
+ RJack::Solr.configure do |c|
31
+ c.setup_http_server do |s|
32
+ s.port = 8983
33
+ s.max_threads = 10
34
+ end
35
+ end
36
+
37
+ And pass <code>rjack-solr-fg -c ./config.rb</code>
38
+
39
+ == License
40
+
41
+ === rjack-solr gem
42
+
43
+ Copyright (c) 2012 David Kellum
44
+
45
+ Licensed under the Apache License, Version 2.0 (the "License"); you
46
+ may not use this file except in compliance with the License. You
47
+ may obtain a copy of the License at:
48
+
49
+ http://www.apache.org/licenses/LICENSE-2.0
50
+
51
+ Unless required by applicable law or agreed to in writing, software
52
+ distributed under the License is distributed on an "AS IS" BASIS,
53
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
54
+ implied. See the License for the specific language governing
55
+ permissions and limitations under the License.
56
+
57
+ === Solr (java)
58
+
59
+ Copyright (c) 2012 The Apache Software Foundation
60
+
61
+ Licensed under the Apache License, Version 2.0 (the "License"); you
62
+ may not use this file except in compliance with the License. You
63
+ may obtain a copy of the License at:
64
+
65
+ http://www.apache.org/licenses/LICENSE-2.0
66
+
67
+ Unless required by applicable law or agreed to in writing, software
68
+ distributed under the License is distributed on an "AS IS" BASIS,
69
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
70
+ implied. See the License for the specific language governing
71
+ permissions and limitations under the License.
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # -*- ruby -*-
2
+
3
+ require 'rubygems'
4
+ require 'bundler/setup'
5
+ require 'rjack-tarpit'
6
+
7
+ RJack::TarPit.new( 'rjack-solr' ) do |tp|
8
+
9
+ tp.rdoc_destinations <<
10
+ 'dekellum@rubyforge.org:/var/www/gforge-projects/rjack/solr'
11
+
12
+ end
data/assembly.xml ADDED
@@ -0,0 +1,20 @@
1
+ <assembly>
2
+ <id>bin</id>
3
+ <formats>
4
+ <format>dir</format>
5
+ </formats>
6
+ <includeBaseDirectory>false</includeBaseDirectory>
7
+ <dependencySets>
8
+ <dependencySet>
9
+ <useProjectArtifact>false</useProjectArtifact>
10
+ <excludes>
11
+ <exclude>commons-codec:commons-codec</exclude>
12
+ <exclude>jakarta-regexp:*</exclude>
13
+ <exclude>org.apache.lucene:*</exclude>
14
+ <exclude>org.apache.solr:solr</exclude>
15
+ <exclude>org.slf4j:*</exclude>
16
+ <exclude>javax.servlet:servlet-api</exclude>
17
+ </excludes>
18
+ </dependencySet>
19
+ </dependencySets>
20
+ </assembly>
data/bin/rjack-solr-fg ADDED
@@ -0,0 +1,53 @@
1
+ #!/usr/bin/env jruby
2
+ # -*- ruby -*-
3
+ #--
4
+ # Copyright (c) 2012 David Kellum
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
7
+ # may not use this file except in compliance with the License. You
8
+ # 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
15
+ # implied. See the License for the specific language governing
16
+ # permissions and limitations under the License.
17
+ #++
18
+
19
+ $LOAD_PATH.unshift File.join( File.dirname(__FILE__), "..", "lib" )
20
+
21
+ require 'rubygems'
22
+
23
+ module BinScript
24
+
25
+ require 'rubygems'
26
+ require 'rjack-logback'
27
+ require 'optparse'
28
+
29
+ include RJack
30
+ Logback.config_console( :thread => true )
31
+ Logback[ 'org.apache.solr' ].level = :warn
32
+
33
+ require 'rjack-solr/server'
34
+
35
+ Hooker.log_with { |m| SLF4J[ 'rjack.solr' ].info( m.rstrip ) }
36
+
37
+ OptionParser.new do |opts|
38
+ opts.on( "-v", "--version", "Display version" ) do
39
+ puts "rjack-solr-fg: #{ Solr::VERSION }"
40
+ exit 1
41
+ end
42
+ opts.on( "-d", "--debug", "Enable verbose DEBUG logging" ) do
43
+ Logback.root.level = Logback::DEBUG
44
+ Logback[ 'org.apache.solr' ].level = nil
45
+ end
46
+ Hooker.register_config( opts )
47
+ end.parse!
48
+
49
+ server = Solr::Server.new
50
+ server.start
51
+ server.join
52
+
53
+ end
data/config/config.rb ADDED
@@ -0,0 +1,9 @@
1
+
2
+ RJack::Solr.configure do |c|
3
+
4
+ c.setup_http_server do |s|
5
+ s.port = 8983
6
+ s.max_threads = 10
7
+ end
8
+
9
+ end
data/init/rjack-solr ADDED
@@ -0,0 +1,44 @@
1
+ #!/usr/bin/env jruby
2
+ # -*- ruby -*-
3
+ #. hashdot.profile += daemon
4
+ #. hashdot.pid_file = ./rjack-solr.pid
5
+ #. hashdot.io_redirect.file = ./rjack-solr.log
6
+ #. hashdot.vm.options += -Xmx1g
7
+ #. hashdot.vm.options += -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled
8
+
9
+ #--
10
+ # Copyright (c) 2012 David Kellum
11
+ #
12
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
13
+ # may not use this file except in compliance with the License. You
14
+ # may obtain a copy of the License at
15
+ #
16
+ # http://www.apache.org/licenses/LICENSE-2.0
17
+ #
18
+ # Unless required by applicable law or agreed to in writing, software
19
+ # distributed under the License is distributed on an "AS IS" BASIS,
20
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
21
+ # implied. See the License for the specific language governing
22
+ # permissions and limitations under the License.
23
+ #++
24
+
25
+ require 'rubygems'
26
+ gem( "rjack-solr", "= 3.6.0.0" )
27
+
28
+ module BinScript
29
+
30
+ require 'rjack-logback'
31
+ include RJack
32
+ Logback.config_console( :full => true, :thread => true )
33
+ Logback[ 'org.apache.solr' ].level = :warn
34
+
35
+ require 'rjack-solr/server'
36
+
37
+ Hooker.log_with { |m| SLF4J[ 'rjack.solr' ].info( m.rstrip ) }
38
+ Hooker.load_file( './config.rb' ) if File.exist?( './config.rb' )
39
+
40
+ server = Solr::Server.new
41
+ server.start
42
+ server.join
43
+
44
+ end
data/lib/rjack-solr.rb ADDED
@@ -0,0 +1,30 @@
1
+ #--
2
+ # Copyright (c) 2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # 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
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ require 'rjack-commons-codec'
18
+ require 'rjack-lucene'
19
+ require 'rjack-jetty'
20
+ require 'rjack-httpclient-3'
21
+
22
+ require 'rjack-solr/base'
23
+
24
+ require 'java'
25
+
26
+ module RJack
27
+ module Solr
28
+ Dir.glob( File.join( LIB_DIR, '*.jar' ) ).each { |jar| require jar }
29
+ end
30
+ end
@@ -0,0 +1,28 @@
1
+ #--
2
+ # Copyright (c) 2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # 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
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ module RJack
18
+ module Solr
19
+
20
+ # SOLR (java) version
21
+ CORE_VERSION = '3.6.0'
22
+
23
+ # rjack gem version
24
+ VERSION = CORE_VERSION + '.0'
25
+
26
+ LIB_DIR = File.dirname( __FILE__ ) # :nodoc:
27
+ end
28
+ end
Binary file
Binary file
@@ -0,0 +1,24 @@
1
+ #--
2
+ # Copyright (c) 2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # 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
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ require 'hooker'
18
+ require 'rjack-solr/base'
19
+
20
+ module RJack::Solr
21
+ def self.configure( &block )
22
+ Hooker.with( :solr, &block )
23
+ end
24
+ end
@@ -0,0 +1,70 @@
1
+ #--
2
+ # Copyright (c) 2012 David Kellum
3
+ #
4
+ # Licensed under the Apache License, Version 2.0 (the "License"); you
5
+ # may not use this file except in compliance with the License. You
6
+ # 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
13
+ # implied. See the License for the specific language governing
14
+ # permissions and limitations under the License.
15
+ #++
16
+
17
+ require 'rjack-jetty-jsp'
18
+
19
+ require 'rjack-solr/base'
20
+ require 'rjack-solr'
21
+ require 'rjack-solr/config'
22
+
23
+ module RJack
24
+ module Solr
25
+
26
+ WEBAPP_PATH = File.expand_path( '../../../webapp', __FILE__ )
27
+
28
+ class Server < RJack::Jetty::ServerFactory
29
+
30
+ attr_accessor :solr_home
31
+
32
+ def initialize()
33
+ super()
34
+
35
+ puts WEBAPP_PATH
36
+ self.webapp_contexts[ '/' ] = WEBAPP_PATH
37
+ self.port = 8983
38
+ @solr_home = '.'
39
+
40
+ Hooker.apply( [ :solr, :http_server ], self )
41
+ end
42
+
43
+ def create_request_log( log_file )
44
+ super.tap do |log|
45
+ log.extended = true
46
+ log.log_latency = true
47
+ end
48
+ end
49
+
50
+ def start
51
+ Java::java.lang.System.set_property( 'solr.solr.home', @solr_home )
52
+
53
+ @server = create
54
+ @server.start
55
+ self.port = @server.connectors[0].local_port
56
+
57
+ @server
58
+ end
59
+
60
+ def join
61
+ @server.join if @server
62
+ end
63
+
64
+ def stop
65
+ @server.stop if @server
66
+ end
67
+
68
+ end
69
+ end
70
+ end