solr_sail 0.0.1-java → 0.0.2-java
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -0
- data/Gemfile.lock +2 -0
- data/Jarfile.lock +25 -14
- data/README.md +57 -3
- data/VERSION +1 -1
- data/lib/solr_sail/cli.rb +4 -4
- data/lib/solr_sail.rb +45 -4
- data/pom.xml +31 -13
- data/{solr_sail-0.0.1.jar → solr_sail-0.0.2.jar} +0 -0
- metadata +14 -4
- data/solr_sail.gemspec +0 -73
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/Jarfile.lock
CHANGED
@@ -4,7 +4,7 @@ scopes:
|
|
4
4
|
dependencies:
|
5
5
|
- pom.xml
|
6
6
|
resolved_dependencies:
|
7
|
-
- com.tobedevoured.command:core:jar:0.0.1
|
7
|
+
- com.tobedevoured.command:core:jar:0.0.1
|
8
8
|
- org.modeshape:modeshape-common:jar:2.8.2.Final
|
9
9
|
- com.metapossum:metapossum-scanner:jar:1.0.1
|
10
10
|
- commons-beanutils:commons-beanutils:jar:1.8.3
|
@@ -36,22 +36,22 @@ scopes:
|
|
36
36
|
- org.eclipse.jetty.orbit:com.sun.el:jar:2.2.0.v201108011116
|
37
37
|
- org.eclipse.jetty.orbit:org.eclipse.jdt.core:jar:3.7.1
|
38
38
|
- org.eclipse.jdt.core.compiler:ecj:jar:3.7.2
|
39
|
-
- org.apache.solr:solr-core:jar:3.6.
|
40
|
-
- org.apache.solr:solr-solrj:jar:3.6.
|
39
|
+
- org.apache.solr:solr-core:jar:3.6.1
|
40
|
+
- org.apache.solr:solr-solrj:jar:3.6.1
|
41
41
|
- commons-httpclient:commons-httpclient:jar:3.1
|
42
42
|
- org.codehaus.woodstox:wstx-asl:jar:3.2.7
|
43
|
-
- org.apache.lucene:lucene-core:jar:3.6.
|
44
|
-
- org.apache.lucene:lucene-analyzers:jar:3.6.
|
45
|
-
- org.apache.lucene:lucene-highlighter:jar:3.6.
|
46
|
-
- org.apache.lucene:lucene-kuromoji:jar:3.6.
|
47
|
-
- org.apache.lucene:lucene-memory:jar:3.6.
|
48
|
-
- org.apache.lucene:lucene-misc:jar:3.6.
|
49
|
-
- org.apache.lucene:lucene-phonetic:jar:3.6.
|
50
|
-
- org.apache.lucene:lucene-queries:jar:3.6.
|
43
|
+
- org.apache.lucene:lucene-core:jar:3.6.1
|
44
|
+
- org.apache.lucene:lucene-analyzers:jar:3.6.1
|
45
|
+
- org.apache.lucene:lucene-highlighter:jar:3.6.1
|
46
|
+
- org.apache.lucene:lucene-kuromoji:jar:3.6.1
|
47
|
+
- org.apache.lucene:lucene-memory:jar:3.6.1
|
48
|
+
- org.apache.lucene:lucene-misc:jar:3.6.1
|
49
|
+
- org.apache.lucene:lucene-phonetic:jar:3.6.1
|
50
|
+
- org.apache.lucene:lucene-queries:jar:3.6.1
|
51
51
|
- jakarta-regexp:jakarta-regexp:jar:1.4
|
52
|
-
- org.apache.lucene:lucene-spatial:jar:3.6.
|
53
|
-
- org.apache.lucene:lucene-spellchecker:jar:3.6.
|
54
|
-
- org.apache.lucene:lucene-grouping:jar:3.6.
|
52
|
+
- org.apache.lucene:lucene-spatial:jar:3.6.1
|
53
|
+
- org.apache.lucene:lucene-spellchecker:jar:3.6.1
|
54
|
+
- org.apache.lucene:lucene-grouping:jar:3.6.1
|
55
55
|
- commons-codec:commons-codec:jar:1.6
|
56
56
|
- commons-fileupload:commons-fileupload:jar:1.2.1
|
57
57
|
- org.slf4j:jcl-over-slf4j:jar:1.6.1
|
@@ -72,6 +72,17 @@ scopes:
|
|
72
72
|
resolved_dependencies:
|
73
73
|
- junit:junit:jar:4.10
|
74
74
|
- org.hamcrest:hamcrest-core:jar:1.1
|
75
|
+
- org.apache.solr:solr-solrj:jar:3.6.1
|
76
|
+
- commons-httpclient:commons-httpclient:jar:3.1
|
77
|
+
- commons-io:commons-io:jar:2.1
|
78
|
+
- org.codehaus.woodstox:wstx-asl:jar:3.2.7
|
79
|
+
- org.slf4j:jcl-over-slf4j:jar:1.6.1
|
80
|
+
- org.slf4j:slf4j-api:jar:1.6.1
|
81
|
+
- org.apache.httpcomponents:httpclient:jar:4.2.1
|
82
|
+
- org.apache.httpcomponents:httpcore:jar:4.2.1
|
83
|
+
- commons-logging:commons-logging:jar:1.1.1
|
84
|
+
- commons-codec:commons-codec:jar:1.6
|
85
|
+
- org.apache.httpcomponents:httpmime:jar:4.2.1
|
75
86
|
repositories:
|
76
87
|
- http://repo1.maven.org/maven2/
|
77
88
|
- http://repository.jboss.org/nexus/content/groups/public-jboss
|
data/README.md
CHANGED
@@ -4,14 +4,68 @@ From zero to search in the flash of a gem.
|
|
4
4
|
|
5
5
|
## Install
|
6
6
|
|
7
|
+
### For Ruby
|
8
|
+
|
7
9
|
gem install solr_sail
|
10
|
+
|
11
|
+
### For Java
|
12
|
+
|
13
|
+
<dependency>
|
14
|
+
<groupId>com.tobedevoured</groupId>
|
15
|
+
<artifactId>solrsail</artifactId>
|
16
|
+
<version>0.0.2</version>
|
17
|
+
</dependency>
|
8
18
|
|
9
19
|
## Usage
|
10
20
|
|
11
|
-
###
|
21
|
+
### From the command line
|
22
|
+
|
23
|
+
The _solr_sail_ gem comes with the executable **solrsail** which makes it easy to setup
|
24
|
+
and start Solr.
|
25
|
+
|
26
|
+
#### Setup Solr
|
27
|
+
|
28
|
+
To create a config directory to run Solr from, in the default path of **solr**,
|
29
|
+
simply run:
|
12
30
|
|
13
31
|
solrsail install
|
14
32
|
|
15
|
-
|
33
|
+
To change the directory, you can pass _--solr_home_ or _-h_:
|
34
|
+
|
35
|
+
solrsail install -h new/path/to/solr
|
36
|
+
|
37
|
+
If you want to make changes to how the Solr Server runs, you can edit the
|
38
|
+
[conf](https://github.com/typesafehub/config) _solr_sail.conf_ under the installed
|
39
|
+
Solr home. Presently only _port_ and _contentpath_ are configurable. An example
|
40
|
+
_solr_sail.conf_:
|
41
|
+
|
42
|
+
solr_sail.solr.port=8983
|
43
|
+
solr_sail.solr.contextpath=/solr
|
44
|
+
|
45
|
+
#### Start up Solr
|
16
46
|
|
17
|
-
solrsail start
|
47
|
+
solrsail start
|
48
|
+
|
49
|
+
To change the directory of the Solr home, you can pass _--solr_home_ or _-h_:
|
50
|
+
|
51
|
+
solrsail start -h new/path/to/solr
|
52
|
+
|
53
|
+
### From Ruby
|
54
|
+
|
55
|
+
#### Setup Solr
|
56
|
+
|
57
|
+
To create a config directory for Solr to run from
|
58
|
+
|
59
|
+
require 'rubygems'
|
60
|
+
require 'solr_sail'
|
61
|
+
|
62
|
+
SolrSail.install_config()
|
63
|
+
|
64
|
+
#### Start up Solr
|
65
|
+
|
66
|
+
require 'rubygems'
|
67
|
+
require 'solr_sail'
|
68
|
+
|
69
|
+
SolrSail.start()
|
70
|
+
|
71
|
+
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/lib/solr_sail/cli.rb
CHANGED
@@ -5,15 +5,15 @@ require 'solr_sail'
|
|
5
5
|
module SolrSail
|
6
6
|
class CLI < Thor
|
7
7
|
desc "install", "Install Solr config"
|
8
|
-
method_option :
|
8
|
+
method_option :solr_home, :aliases => "-h", :default => 'solr', :desc => "Path to install solr config"
|
9
9
|
def install
|
10
|
-
SolrSail.install_config( :
|
10
|
+
SolrSail.install_config( :solr_home => options[:solr_home] )
|
11
11
|
end
|
12
12
|
|
13
13
|
desc "start", "Run Solr"
|
14
|
-
method_option :
|
14
|
+
method_option :solr_home, :aliases => "-h", :default => 'solr', :desc => "Path to install solr config"
|
15
15
|
def start
|
16
|
-
SolrSail.start( :
|
16
|
+
SolrSail.start( :solr_home => options[:solr_home] )
|
17
17
|
end
|
18
18
|
|
19
19
|
desc "version", "Version"
|
data/lib/solr_sail.rb
CHANGED
@@ -4,38 +4,79 @@ require 'java'
|
|
4
4
|
|
5
5
|
require 'solr_sail/version'
|
6
6
|
|
7
|
+
# :title:SolrSail
|
8
|
+
#
|
9
|
+
# Handles extracting the config and running an instance of Solr
|
10
|
+
#
|
11
|
+
# = Authors
|
12
|
+
# Michael Guymon
|
13
|
+
#
|
7
14
|
module SolrSail
|
8
15
|
|
9
16
|
DEFAULT_JAR_NAME = "solr_sail-#{SolrSail::VERSION}.jar"
|
10
17
|
DEFAULT_JAR = File.expand_path("#{File.dirname(__FILE__)}/../#{DEFAULT_JAR_NAME}")
|
11
18
|
DEFAULT_LOCKFILE = File.expand_path("#{File.dirname(__FILE__)}/../Jarfile.lock")
|
12
19
|
|
20
|
+
#
|
21
|
+
# Extract the configuration files for Solr
|
22
|
+
#
|
23
|
+
# opts:
|
24
|
+
# * :jar: path to the solr_sail jar, default to jar packaged with the gem
|
25
|
+
# * :lockfile: path to lockfile that contains the jar dependencies, defaults to Jarfile.lock packaged with the gem
|
26
|
+
# * :solr_home: path to solr home, defaults to 'solr'
|
13
27
|
def self.install_config( opts )
|
14
|
-
opts = { :jar => DEFAULT_JAR, :lockfile => DEFAULT_LOCKFILE }.merge( opts )
|
28
|
+
opts = { :solr_home => 'solr', :jar => DEFAULT_JAR, :lockfile => DEFAULT_LOCKFILE }.merge( opts )
|
15
29
|
lockfile = opts.delete(:lockfile)
|
16
30
|
jar = opts.delete(:jar)
|
17
31
|
|
18
32
|
# XXX: should use LockJar to prevent duplicates in the classpath
|
19
33
|
$CLASSPATH << File.expand_path( jar )
|
20
34
|
|
35
|
+
# XXX: need a safer way to pass opts to LockJar
|
21
36
|
LockJar.install( lockfile, opts )
|
22
37
|
LockJar.load( lockfile, opts )
|
23
38
|
|
24
|
-
solr_config = com.tobedevoured.solrsail.SolrConfig.new( opts[:
|
39
|
+
solr_config = com.tobedevoured.solrsail.SolrConfig.new( opts[:solr_home] )
|
25
40
|
solr_config.install()
|
26
41
|
end
|
27
42
|
|
43
|
+
#
|
44
|
+
# Start Solr
|
45
|
+
#
|
46
|
+
# The server is configued by solr_sail.conf loaded from the solr home. The
|
47
|
+
# opts passed in override solr_sail.conf
|
48
|
+
#
|
49
|
+
# opts:
|
50
|
+
# * :context_path: context path solr runs under, defaults to /solr
|
51
|
+
# * :jar: path to the solr_sail jar, default to jar packaged with the gem
|
52
|
+
# * :join: have the server join the thread. Defaults to false
|
53
|
+
# * :lockfile: path to lockfile that contains the jar dependencies, defaults to Jarfile.lock packaged with the gem
|
54
|
+
# * :port: the port solr runs on, defaults to 8983
|
55
|
+
# * :solr_home: path to solr home, defaults to 'solr'
|
56
|
+
#
|
28
57
|
def self.start( opts )
|
29
|
-
opts = {
|
58
|
+
opts = {
|
59
|
+
:solr_home => 'solr', :jar => DEFAULT_JAR, :lockfile => DEFAULT_LOCKFILE, :join => false }.merge( opts )
|
60
|
+
|
30
61
|
lockfile = opts.delete(:lockfile)
|
31
62
|
jar = opts.delete(:jar)
|
32
63
|
|
33
64
|
# XXX: should use LockJar to prevent duplicates in the classpath
|
34
65
|
$CLASSPATH << File.expand_path( jar )
|
35
66
|
|
67
|
+
# XXX: need a safer way to pass opts to LockJar
|
36
68
|
LockJar.load( lockfile, opts )
|
37
69
|
|
38
|
-
jetty = com.tobedevoured.solrsail.JettyServer.new()
|
70
|
+
jetty = com.tobedevoured.solrsail.JettyServer.new( opts[:solr_home] )
|
71
|
+
|
72
|
+
if opts[:port]
|
73
|
+
jetty.setPort( opts[:port] )
|
74
|
+
end
|
75
|
+
|
76
|
+
if opts[:context_path]
|
77
|
+
jetty.setContextPath(opts[:context_path])
|
78
|
+
end
|
79
|
+
|
39
80
|
jetty.start(opts[:join])
|
40
81
|
|
41
82
|
jetty
|
data/pom.xml
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
|
5
5
|
<groupId>com.tobedevoured</groupId>
|
6
6
|
<artifactId>solr_sail</artifactId>
|
7
|
-
<version>0.0.
|
7
|
+
<version>0.0.2</version>
|
8
8
|
<packaging>jar</packaging>
|
9
9
|
|
10
10
|
<name>Solr Sail</name>
|
@@ -102,7 +102,7 @@
|
|
102
102
|
<dependency>
|
103
103
|
<groupId>org.apache.solr</groupId>
|
104
104
|
<artifactId>solr-core</artifactId>
|
105
|
-
<version>3.6.
|
105
|
+
<version>3.6.1</version>
|
106
106
|
</dependency>
|
107
107
|
|
108
108
|
<!-- Logging -->
|
@@ -112,8 +112,6 @@
|
|
112
112
|
<version>1.0.6</version>
|
113
113
|
</dependency>
|
114
114
|
|
115
|
-
|
116
|
-
|
117
115
|
<!-- Testing -->
|
118
116
|
<dependency>
|
119
117
|
<groupId>junit</groupId>
|
@@ -121,19 +119,39 @@
|
|
121
119
|
<version>4.10</version>
|
122
120
|
<scope>test</scope>
|
123
121
|
</dependency>
|
122
|
+
<dependency>
|
123
|
+
<groupId>org.apache.solr</groupId>
|
124
|
+
<artifactId>solr-solrj</artifactId>
|
125
|
+
<version>3.6.1</version>
|
126
|
+
<scope>test</scope>
|
127
|
+
</dependency>
|
128
|
+
<dependency>
|
129
|
+
<groupId>org.apache.httpcomponents</groupId>
|
130
|
+
<artifactId>httpclient</artifactId>
|
131
|
+
<version>4.2.1</version>
|
132
|
+
<scope>test</scope>
|
133
|
+
</dependency>
|
134
|
+
<dependency>
|
135
|
+
<groupId>org.apache.httpcomponents</groupId>
|
136
|
+
<artifactId>httpmime</artifactId>
|
137
|
+
<version>4.2.1</version>
|
138
|
+
<scope>test</scope>
|
139
|
+
</dependency>
|
124
140
|
</dependencies>
|
125
141
|
|
126
|
-
|
127
142
|
<build>
|
128
143
|
<plugins>
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
144
|
+
<plugin>
|
145
|
+
<groupId>org.apache.maven.plugins</groupId>
|
146
|
+
<artifactId>maven-jar-plugin</artifactId>
|
147
|
+
<configuration>
|
148
|
+
<archive>
|
149
|
+
<manifest>
|
150
|
+
<mainClass>com.tobedevoured.command.Runner</mainClass>
|
151
|
+
</manifest>
|
152
|
+
</archive>
|
153
|
+
</configuration>
|
154
|
+
</plugin>
|
137
155
|
<plugin>
|
138
156
|
<groupId>org.apache.maven.plugins</groupId>
|
139
157
|
<artifactId>maven-source-plugin</artifactId>
|
Binary file
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: solr_sail
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.2
|
6
6
|
platform: java
|
7
7
|
authors:
|
8
8
|
- Michael Guymon
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-03 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: lock_jar
|
@@ -89,6 +89,17 @@ dependencies:
|
|
89
89
|
requirement: *id007
|
90
90
|
prerelease: false
|
91
91
|
type: :development
|
92
|
+
- !ruby/object:Gem::Dependency
|
93
|
+
name: yard
|
94
|
+
version_requirements: &id008 !ruby/object:Gem::Requirement
|
95
|
+
none: false
|
96
|
+
requirements:
|
97
|
+
- - ">="
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: "0"
|
100
|
+
requirement: *id008
|
101
|
+
prerelease: false
|
102
|
+
type: :development
|
92
103
|
description: From zero to search in the flash of a gem.
|
93
104
|
email: michael@tobedevoured.com
|
94
105
|
executables:
|
@@ -111,8 +122,7 @@ files:
|
|
111
122
|
- lib/solr_sail/cli.rb
|
112
123
|
- lib/solr_sail/version.rb
|
113
124
|
- pom.xml
|
114
|
-
- solr_sail-0.0.
|
115
|
-
- solr_sail.gemspec
|
125
|
+
- solr_sail-0.0.2.jar
|
116
126
|
homepage: http://github.com/mguymon/solr_sail
|
117
127
|
licenses:
|
118
128
|
- MIT
|
data/solr_sail.gemspec
DELETED
@@ -1,73 +0,0 @@
|
|
1
|
-
# Generated by jeweler
|
2
|
-
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
-
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
-
# -*- encoding: utf-8 -*-
|
5
|
-
|
6
|
-
Gem::Specification.new do |s|
|
7
|
-
s.name = "solr_sail"
|
8
|
-
s.version = "0.0.1"
|
9
|
-
s.platform = "java"
|
10
|
-
|
11
|
-
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
|
-
s.authors = ["Michael Guymon"]
|
13
|
-
s.date = "2012-09-02"
|
14
|
-
s.description = "From zero to search in the flash of a gem."
|
15
|
-
s.email = "michael@tobedevoured.com"
|
16
|
-
s.executables = ["solrsail"]
|
17
|
-
s.extra_rdoc_files = [
|
18
|
-
"LICENSE",
|
19
|
-
"README.md"
|
20
|
-
]
|
21
|
-
s.files = [
|
22
|
-
"Gemfile",
|
23
|
-
"Gemfile.lock",
|
24
|
-
"Jarfile",
|
25
|
-
"Jarfile.lock",
|
26
|
-
"LICENSE",
|
27
|
-
"README.md",
|
28
|
-
"VERSION",
|
29
|
-
"bin/solrsail",
|
30
|
-
"lib/solr_sail.rb",
|
31
|
-
"lib/solr_sail/cli.rb",
|
32
|
-
"lib/solr_sail/version.rb",
|
33
|
-
"pom.xml",
|
34
|
-
"solr_sail-0.0.1.jar",
|
35
|
-
"solr_sail.gemspec"
|
36
|
-
]
|
37
|
-
s.homepage = "http://github.com/mguymon/solr_sail"
|
38
|
-
s.licenses = ["MIT"]
|
39
|
-
s.require_paths = ["lib"]
|
40
|
-
s.rubygems_version = "1.8.24"
|
41
|
-
s.summary = "From zero to search in the flash of a gem."
|
42
|
-
|
43
|
-
if s.respond_to? :specification_version then
|
44
|
-
s.specification_version = 3
|
45
|
-
|
46
|
-
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
47
|
-
s.add_runtime_dependency(%q<lock_jar>, ["~> 0.5.2"])
|
48
|
-
s.add_runtime_dependency(%q<thor>, ["> 0.14.0"])
|
49
|
-
s.add_development_dependency(%q<rsolr>, ["~> 1.0.0"])
|
50
|
-
s.add_development_dependency(%q<rspec>, ["~> 2.11.0"])
|
51
|
-
s.add_development_dependency(%q<bundler>, ["~> 1.1.4"])
|
52
|
-
s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
|
53
|
-
s.add_development_dependency(%q<jruby-openssl>, [">= 0"])
|
54
|
-
else
|
55
|
-
s.add_dependency(%q<lock_jar>, ["~> 0.5.2"])
|
56
|
-
s.add_dependency(%q<thor>, ["> 0.14.0"])
|
57
|
-
s.add_dependency(%q<rsolr>, ["~> 1.0.0"])
|
58
|
-
s.add_dependency(%q<rspec>, ["~> 2.11.0"])
|
59
|
-
s.add_dependency(%q<bundler>, ["~> 1.1.4"])
|
60
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
61
|
-
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
62
|
-
end
|
63
|
-
else
|
64
|
-
s.add_dependency(%q<lock_jar>, ["~> 0.5.2"])
|
65
|
-
s.add_dependency(%q<thor>, ["> 0.14.0"])
|
66
|
-
s.add_dependency(%q<rsolr>, ["~> 1.0.0"])
|
67
|
-
s.add_dependency(%q<rspec>, ["~> 2.11.0"])
|
68
|
-
s.add_dependency(%q<bundler>, ["~> 1.1.4"])
|
69
|
-
s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
|
70
|
-
s.add_dependency(%q<jruby-openssl>, [">= 0"])
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|