rere 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (168) hide show
  1. data/.classpath +260 -0
  2. data/.gitignore +28 -0
  3. data/.project +14 -0
  4. data/.ruby-version +1 -0
  5. data/.settings/org.eclim.prefs +3 -0
  6. data/.settings/org.eclipse.jdt.core.prefs +5 -0
  7. data/.settings/org.eclipse.jdt.ui.prefs +2 -0
  8. data/Gemfile +7 -0
  9. data/LICENSE +22 -0
  10. data/README.md +44 -0
  11. data/Rakefile +65 -0
  12. data/bin/solr +61 -0
  13. data/example/config/solr.yml +23 -0
  14. data/example/log/.gitkeep +0 -0
  15. data/example/solr/README.txt +63 -0
  16. data/example/solr/collection1/README.txt +50 -0
  17. data/example/solr/collection1/conf/admin-extra.html +24 -0
  18. data/example/solr/collection1/conf/admin-extra.menu-bottom.html +25 -0
  19. data/example/solr/collection1/conf/admin-extra.menu-top.html +25 -0
  20. data/example/solr/collection1/conf/currency.xml +67 -0
  21. data/example/solr/collection1/conf/elevate.xml +38 -0
  22. data/example/solr/collection1/conf/lang/contractions_ca.txt +8 -0
  23. data/example/solr/collection1/conf/lang/contractions_fr.txt +15 -0
  24. data/example/solr/collection1/conf/lang/contractions_ga.txt +5 -0
  25. data/example/solr/collection1/conf/lang/contractions_it.txt +23 -0
  26. data/example/solr/collection1/conf/lang/hyphenations_ga.txt +5 -0
  27. data/example/solr/collection1/conf/lang/stemdict_nl.txt +6 -0
  28. data/example/solr/collection1/conf/lang/stoptags_ja.txt +420 -0
  29. data/example/solr/collection1/conf/lang/stopwords_ar.txt +125 -0
  30. data/example/solr/collection1/conf/lang/stopwords_bg.txt +193 -0
  31. data/example/solr/collection1/conf/lang/stopwords_ca.txt +220 -0
  32. data/example/solr/collection1/conf/lang/stopwords_cz.txt +172 -0
  33. data/example/solr/collection1/conf/lang/stopwords_da.txt +108 -0
  34. data/example/solr/collection1/conf/lang/stopwords_de.txt +292 -0
  35. data/example/solr/collection1/conf/lang/stopwords_el.txt +78 -0
  36. data/example/solr/collection1/conf/lang/stopwords_en.txt +54 -0
  37. data/example/solr/collection1/conf/lang/stopwords_es.txt +354 -0
  38. data/example/solr/collection1/conf/lang/stopwords_eu.txt +99 -0
  39. data/example/solr/collection1/conf/lang/stopwords_fa.txt +313 -0
  40. data/example/solr/collection1/conf/lang/stopwords_fi.txt +95 -0
  41. data/example/solr/collection1/conf/lang/stopwords_fr.txt +184 -0
  42. data/example/solr/collection1/conf/lang/stopwords_ga.txt +110 -0
  43. data/example/solr/collection1/conf/lang/stopwords_gl.txt +161 -0
  44. data/example/solr/collection1/conf/lang/stopwords_hi.txt +235 -0
  45. data/example/solr/collection1/conf/lang/stopwords_hu.txt +209 -0
  46. data/example/solr/collection1/conf/lang/stopwords_hy.txt +46 -0
  47. data/example/solr/collection1/conf/lang/stopwords_id.txt +359 -0
  48. data/example/solr/collection1/conf/lang/stopwords_it.txt +301 -0
  49. data/example/solr/collection1/conf/lang/stopwords_ja.txt +127 -0
  50. data/example/solr/collection1/conf/lang/stopwords_lv.txt +172 -0
  51. data/example/solr/collection1/conf/lang/stopwords_nl.txt +117 -0
  52. data/example/solr/collection1/conf/lang/stopwords_no.txt +192 -0
  53. data/example/solr/collection1/conf/lang/stopwords_pt.txt +251 -0
  54. data/example/solr/collection1/conf/lang/stopwords_ro.txt +233 -0
  55. data/example/solr/collection1/conf/lang/stopwords_ru.txt +241 -0
  56. data/example/solr/collection1/conf/lang/stopwords_sv.txt +131 -0
  57. data/example/solr/collection1/conf/lang/stopwords_th.txt +119 -0
  58. data/example/solr/collection1/conf/lang/stopwords_tr.txt +212 -0
  59. data/example/solr/collection1/conf/lang/userdict_ja.txt +29 -0
  60. data/example/solr/collection1/conf/mapping-FoldToASCII.txt +3813 -0
  61. data/example/solr/collection1/conf/mapping-ISOLatin1Accent.txt +246 -0
  62. data/example/solr/collection1/conf/protwords.txt +21 -0
  63. data/example/solr/collection1/conf/schema.xml +1125 -0
  64. data/example/solr/collection1/conf/scripts.conf +24 -0
  65. data/example/solr/collection1/conf/solrconfig.xml +1816 -0
  66. data/example/solr/collection1/conf/spellings.txt +2 -0
  67. data/example/solr/collection1/conf/stopwords.txt +14 -0
  68. data/example/solr/collection1/conf/synonyms.txt +29 -0
  69. data/example/solr/collection1/conf/update-script.js +53 -0
  70. data/example/solr/collection1/conf/velocity/VM_global_library.vm +170 -0
  71. data/example/solr/collection1/conf/velocity/browse.vm +50 -0
  72. data/example/solr/collection1/conf/velocity/cluster.vm +9 -0
  73. data/example/solr/collection1/conf/velocity/clusterResults.vm +12 -0
  74. data/example/solr/collection1/conf/velocity/debug.vm +17 -0
  75. data/example/solr/collection1/conf/velocity/did_you_mean.vm +4 -0
  76. data/example/solr/collection1/conf/velocity/facet_fields.vm +15 -0
  77. data/example/solr/collection1/conf/velocity/facet_pivot.vm +3 -0
  78. data/example/solr/collection1/conf/velocity/facet_queries.vm +3 -0
  79. data/example/solr/collection1/conf/velocity/facet_ranges.vm +15 -0
  80. data/example/solr/collection1/conf/velocity/facets.vm +5 -0
  81. data/example/solr/collection1/conf/velocity/footer.vm +17 -0
  82. data/example/solr/collection1/conf/velocity/head.vm +32 -0
  83. data/example/solr/collection1/conf/velocity/header.vm +3 -0
  84. data/example/solr/collection1/conf/velocity/hit.vm +11 -0
  85. data/example/solr/collection1/conf/velocity/hitGrouped.vm +24 -0
  86. data/example/solr/collection1/conf/velocity/join-doc.vm +4 -0
  87. data/example/solr/collection1/conf/velocity/jquery.autocomplete.css +48 -0
  88. data/example/solr/collection1/conf/velocity/jquery.autocomplete.js +763 -0
  89. data/example/solr/collection1/conf/velocity/layout.vm +20 -0
  90. data/example/solr/collection1/conf/velocity/main.css +208 -0
  91. data/example/solr/collection1/conf/velocity/product-doc.vm +27 -0
  92. data/example/solr/collection1/conf/velocity/query.vm +42 -0
  93. data/example/solr/collection1/conf/velocity/queryGroup.vm +19 -0
  94. data/example/solr/collection1/conf/velocity/querySpatial.vm +40 -0
  95. data/example/solr/collection1/conf/velocity/richtext-doc.vm +114 -0
  96. data/example/solr/collection1/conf/velocity/suggest.vm +3 -0
  97. data/example/solr/collection1/conf/velocity/tabs.vm +6 -0
  98. data/example/solr/collection1/conf/xslt/example.xsl +132 -0
  99. data/example/solr/collection1/conf/xslt/example_atom.xsl +67 -0
  100. data/example/solr/collection1/conf/xslt/example_rss.xsl +66 -0
  101. data/example/solr/collection1/conf/xslt/luke.xsl +337 -0
  102. data/example/solr/collection1/conf/xslt/updateXml.xsl +70 -0
  103. data/example/solr/collection1/data/index/segments.gen +0 -0
  104. data/example/solr/collection1/data/index/segments_1 +0 -0
  105. data/example/solr/data/development/index/segments.gen +0 -0
  106. data/example/solr/data/development/index/segments_1 +0 -0
  107. data/example/solr/solr.xml +53 -0
  108. data/example/solr/zoo.cfg +17 -0
  109. data/lib/rere.rb +66 -0
  110. data/lib/rere/railtie.rb +8 -0
  111. data/lib/rere/server.rb +380 -0
  112. data/lib/rere/tasks/solr.rake +47 -0
  113. data/lib/rere/version.rb +3 -0
  114. data/pom.xml +168 -0
  115. data/rere.gemspec +26 -0
  116. data/server/README.txt +78 -0
  117. data/server/cloud-scripts/zkcli.bat +12 -0
  118. data/server/cloud-scripts/zkcli.sh +14 -0
  119. data/server/contexts/solr-jetty-context.xml +8 -0
  120. data/server/etc/create-solrtest.keystore.sh +37 -0
  121. data/server/etc/jetty.xml +205 -0
  122. data/server/etc/logging.properties +38 -0
  123. data/server/etc/solrtest.keystore +0 -0
  124. data/server/etc/webdefault.xml +527 -0
  125. data/server/exampledocs/books.csv +11 -0
  126. data/server/exampledocs/books.json +51 -0
  127. data/server/exampledocs/gb18030-example.xml +32 -0
  128. data/server/exampledocs/hd.xml +56 -0
  129. data/server/exampledocs/ipod_other.xml +60 -0
  130. data/server/exampledocs/ipod_video.xml +40 -0
  131. data/server/exampledocs/manufacturers.xml +75 -0
  132. data/server/exampledocs/mem.xml +77 -0
  133. data/server/exampledocs/money.xml +65 -0
  134. data/server/exampledocs/monitor.xml +35 -0
  135. data/server/exampledocs/monitor2.xml +34 -0
  136. data/server/exampledocs/mp500.xml +43 -0
  137. data/server/exampledocs/post.jar +0 -0
  138. data/server/exampledocs/post.sh +30 -0
  139. data/server/exampledocs/sd500.xml +38 -0
  140. data/server/exampledocs/solr.xml +38 -0
  141. data/server/exampledocs/test_utf8.sh +93 -0
  142. data/server/exampledocs/utf8-example.xml +42 -0
  143. data/server/exampledocs/vidcard.xml +62 -0
  144. data/server/lib/ext/jcl-over-slf4j-1.6.6.jar +0 -0
  145. data/server/lib/ext/jul-to-slf4j-1.6.6.jar +0 -0
  146. data/server/lib/ext/log4j-1.2.16.jar +0 -0
  147. data/server/lib/ext/slf4j-api-1.6.6.jar +0 -0
  148. data/server/lib/ext/slf4j-log4j12-1.6.6.jar +0 -0
  149. data/server/lib/jetty-continuation-8.1.8.v20121106.jar +0 -0
  150. data/server/lib/jetty-deploy-8.1.8.v20121106.jar +0 -0
  151. data/server/lib/jetty-http-8.1.8.v20121106.jar +0 -0
  152. data/server/lib/jetty-io-8.1.8.v20121106.jar +0 -0
  153. data/server/lib/jetty-jmx-8.1.8.v20121106.jar +0 -0
  154. data/server/lib/jetty-security-8.1.8.v20121106.jar +0 -0
  155. data/server/lib/jetty-server-8.1.8.v20121106.jar +0 -0
  156. data/server/lib/jetty-servlet-8.1.8.v20121106.jar +0 -0
  157. data/server/lib/jetty-util-8.1.8.v20121106.jar +0 -0
  158. data/server/lib/jetty-webapp-8.1.8.v20121106.jar +0 -0
  159. data/server/lib/jetty-xml-8.1.8.v20121106.jar +0 -0
  160. data/server/lib/servlet-api-3.0.jar +0 -0
  161. data/server/resources/log4j.properties +19 -0
  162. data/server/solr/README.txt +63 -0
  163. data/server/solr/solr.xml +53 -0
  164. data/server/solr/zoo.cfg +17 -0
  165. data/server/start.jar +0 -0
  166. data/server/webapps/solr.war +0 -0
  167. data/solr/lib/solr-winds-0.1.jar +0 -0
  168. metadata +284 -0
@@ -0,0 +1,47 @@
1
+ namespace :solr do
2
+
3
+ desc "Start solr"
4
+ task :start do
5
+ timeout = (ENV['TIMEOUT'] || 10).to_i
6
+ Rere.start(timeout)
7
+ end
8
+
9
+ desc "Starts solr in the foreground"
10
+ task :run do
11
+ Rere.run
12
+ end
13
+
14
+ desc "Stop solr for testing"
15
+ task :stop do
16
+ Rere.stop
17
+ end
18
+
19
+ desc "Check if test server is running"
20
+ task :status do
21
+ if Rere.running?
22
+ puts "Rere is up"
23
+ else
24
+ puts "Rere is down"
25
+ end
26
+ end
27
+
28
+ desc "Tail the server logs for the instance"
29
+ task :tail do
30
+ exec "tail -f #{Rere.log_path}"
31
+ end
32
+
33
+ desc "Output the path to the logs"
34
+ task :logs do
35
+ puts Rere.log_path
36
+ end
37
+
38
+
39
+ desc "Reloads the core suppled with CORE=<corename>"
40
+ task :reload_core do
41
+ corename = ENV['CORE']
42
+ abort("CORE=<corename> is required") if corename.nil?
43
+
44
+ Rere.reload_core(corename)
45
+ end
46
+
47
+ end
@@ -0,0 +1,3 @@
1
+ module Rere
2
+ VERSION = "0.0.1"
3
+ end
data/pom.xml ADDED
@@ -0,0 +1,168 @@
1
+ <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3
+ <modelVersion>4.0.0</modelVersion>
4
+ <groupId>org.kuripai</groupId>
5
+ <artifactId>rere</artifactId>
6
+ <version>0.1</version>
7
+ <packaging>jar</packaging>
8
+ <name>rere</name>
9
+
10
+ <!-- https://github.com/torquebox/jruby-maven-plugins/blob/master/minitest-maven-plugin/src/it/minitest-failure/pom.xml -->
11
+ <repositories>
12
+ <repository>
13
+ <id>central</id>
14
+ <name>Maven Repository Switchboard</name>
15
+ <layout>default</layout>
16
+ <url>http://repo1.maven.org/maven2</url>
17
+ </repository>
18
+
19
+ <!-- <repository> <id>rubygems-releases</id> <url>http://rubygems-proxy.torquebox.org/releases</url>
20
+ </repository> -->
21
+ </repositories>
22
+
23
+ <pluginRepositories>
24
+ <pluginRepository>
25
+ <id>central</id>
26
+ <name>Maven Plugin Repository</name>
27
+ <url>http://repo1.maven.org/maven2</url>
28
+ <layout>default</layout>
29
+ </pluginRepository>
30
+ </pluginRepositories>
31
+
32
+ <dependencies>
33
+
34
+ <dependency>
35
+ <groupId>org.apache.lucene</groupId>
36
+ <artifactId>lucene-test-framework</artifactId>
37
+ <scope>test</scope>
38
+ <version>${solr.version}</version>
39
+ </dependency>
40
+
41
+ <dependency>
42
+ <groupId>org.apache.solr</groupId>
43
+ <artifactId>solr-test-framework</artifactId>
44
+ <scope>test</scope>
45
+ <version>${solr.version}</version>
46
+ </dependency>
47
+
48
+
49
+ <dependency>
50
+ <groupId>org.apache.lucene</groupId>
51
+ <artifactId>lucene-core</artifactId>
52
+ <version>${solr.version}</version>
53
+ </dependency>
54
+
55
+ <dependency>
56
+ <groupId>org.apache.lucene</groupId>
57
+ <artifactId>lucene-facet</artifactId>
58
+ <version>${solr.version}</version>
59
+ </dependency>
60
+
61
+ <dependency>
62
+ <groupId>org.apache.solr</groupId>
63
+ <artifactId>solr</artifactId>
64
+ <version>${solr.version}</version>
65
+ <type>war</type>
66
+ </dependency>
67
+
68
+ <dependency>
69
+ <groupId>org.apache.solr</groupId>
70
+ <artifactId>solr-core</artifactId>
71
+ <version>${solr.version}</version>
72
+ </dependency>
73
+ <dependency>
74
+ <groupId>org.apache.solr</groupId>
75
+ <artifactId>solr-solrj</artifactId>
76
+ <version>${solr.version}</version>
77
+ </dependency>
78
+
79
+ <dependency>
80
+ <groupId>org.apache.solr</groupId>
81
+ <artifactId>solr-langid</artifactId>
82
+ <version>${solr.version}</version>
83
+ </dependency>
84
+ <dependency>
85
+ <groupId>log4j</groupId>
86
+ <artifactId>log4j</artifactId>
87
+ <version>1.2.16</version>
88
+ </dependency>
89
+ <dependency>
90
+ <groupId>commons-cli</groupId>
91
+ <artifactId>commons-cli</artifactId>
92
+ <version>1.2</version>
93
+ </dependency>
94
+
95
+ <dependency>
96
+ <groupId>javax.servlet</groupId>
97
+ <artifactId>servlet-api</artifactId>
98
+ <version>2.5</version>
99
+ </dependency>
100
+
101
+
102
+ </dependencies>
103
+ <build>
104
+
105
+ <!-- <sourceDirectory>${basedir}/src/java</sourceDirectory> <testSourceDirectory>${basedir}/test/java</testSourceDirectory>
106
+ <testResources> <testResource> <directory>${basedir}/test/resources</directory>
107
+ </testResource> </testResources> -->
108
+
109
+ <plugins>
110
+
111
+ <plugin>
112
+ <groupId>org.apache.maven.plugins</groupId>
113
+ <artifactId>maven-idea-plugin</artifactId>
114
+ <version>2.2</version>
115
+ <configuration>
116
+ <jdkLevel>1.6</jdkLevel>
117
+ </configuration>
118
+ </plugin>
119
+
120
+ <plugin>
121
+ <groupId>org.apache.maven.plugins</groupId>
122
+ <artifactId>maven-compiler-plugin</artifactId>
123
+ <version>3.1</version>
124
+ <configuration>
125
+ <source>1.6</source>
126
+ <target>1.6</target>
127
+ <testSource>1.6</testSource>
128
+ <testTarget>1.6</testTarget>
129
+ </configuration>
130
+ </plugin>
131
+
132
+ <plugin>
133
+ <groupId>org.apache.maven.plugins</groupId>
134
+ <artifactId>maven-jar-plugin</artifactId>
135
+ <version>2.3.1</version>
136
+ <configuration>
137
+ <outputDirectory>solr/lib</outputDirectory>
138
+ </configuration>
139
+ </plugin>
140
+
141
+
142
+ <plugin>
143
+ <groupId>org.mortbay.jetty</groupId>
144
+ <artifactId>jetty-maven-plugin</artifactId>
145
+ <!--
146
+ <version>8.1.10.v20130312</version>
147
+ -->
148
+ <configuration>
149
+ <jettyConfig>${basedir}/src/test/resources/jetty-env.xml</jettyConfig>
150
+ </configuration>
151
+ </plugin>
152
+
153
+ <plugin>
154
+ <groupId>org.apache.maven.plugins</groupId>
155
+ <artifactId>maven-surefire-plugin</artifactId>
156
+ <version>2.14.1</version>
157
+ <configuration>
158
+ <argLine>-ea</argLine>
159
+ </configuration>
160
+ </plugin>
161
+
162
+
163
+ </plugins>
164
+ </build>
165
+ <properties>
166
+ <solr.version>4.3.1</solr.version>
167
+ </properties>
168
+ </project>
data/rere.gemspec ADDED
@@ -0,0 +1,26 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path('../lib/rere/version', __FILE__)
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["rainkinz"]
6
+ gem.email = ["brendan.grainger@gmail.com"]
7
+ gem.description = <<-TEXT
8
+ Bundles solr in a gem
9
+ TEXT
10
+ gem.summary = %q{Bundles solr in a gem for easy(-er) distribution}
11
+ gem.homepage = ""
12
+
13
+ gem.files = `git ls-files`.split($\)
14
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
15
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
16
+ gem.name = "rere"
17
+ gem.require_paths = ["lib"]
18
+ gem.version = Rere::VERSION
19
+
20
+ gem.add_dependency 'childprocess'
21
+ gem.add_dependency 'escape'
22
+ gem.add_dependency 'timeit', '0.0.4'
23
+
24
+ gem.add_development_dependency 'rspec-core', '~> 2.11.1'
25
+
26
+ end
data/server/README.txt ADDED
@@ -0,0 +1,78 @@
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
+ Solr example
17
+ ------------
18
+
19
+ This directory contains an instance of the Jetty Servlet container setup to
20
+ run Solr using an example configuration.
21
+
22
+ To run this example:
23
+
24
+ java -jar start.jar
25
+
26
+ in this example directory, and when Solr is started connect to
27
+
28
+ http://localhost:8983/solr/
29
+
30
+ To add documents to the index, use the post.jar (or post.sh script) in
31
+ the example/exampledocs subdirectory (while Solr is running), for example:
32
+
33
+ cd exampledocs
34
+ java -jar post.jar *.xml
35
+ Or: sh post.sh *.xml
36
+
37
+ For more information about this example please read...
38
+
39
+ * example/solr/README.txt
40
+ For more information about the "Solr Home" and Solr specific configuration
41
+ * http://lucene.apache.org/solr/tutorial.html
42
+ For a Tutorial using this example configuration
43
+ * http://wiki.apache.org/solr/SolrResources
44
+ For a list of other tutorials and introductory articles.
45
+
46
+ Notes About These Examples
47
+ --------------------------
48
+
49
+ * SolrHome *
50
+
51
+ By default, start.jar starts Solr in Jetty using the default Solr Home
52
+ directory of "./solr/" (relative to the working directory of hte servlet
53
+ container). To run other example configurations, you can specify the
54
+ solr.solr.home system property when starting jetty...
55
+
56
+ java -Dsolr.solr.home=multicore -jar start.jar
57
+ java -Dsolr.solr.home=example-DIH/solr -jar start.jar
58
+
59
+ * References to Jar Files Outside This Directory *
60
+
61
+ Various example SolrHome dirs contained in this directory may use "<lib>"
62
+ statements in the solrconfig.xml file to reference plugin jars outside of
63
+ this directory for loading "contrib" plugins via relative paths.
64
+
65
+ If you make a copy of this example server and wish to use the
66
+ ExtractingRequestHandler (SolrCell), DataImportHandler (DIH), UIMA, the
67
+ clustering component, or any other modules in "contrib", you will need to
68
+ copy the required jars or update the paths to those jars in your
69
+ solrconfig.xml.
70
+
71
+ * Logging *
72
+
73
+ By default, Jetty & Solr will log to the console a logs/solr.log. This can be convenient when
74
+ first getting started, but eventually you will want to log just to a file. To
75
+ configure logging, edit the log4j.properties file in "resources".
76
+
77
+ It is also possible to setup log4j or other popular logging frameworks.
78
+
@@ -0,0 +1,12 @@
1
+ REM You can override pass the following parameters to this script:
2
+ REM
3
+
4
+ set JVM=java
5
+
6
+ REM Find location of this script
7
+
8
+ set SDIR=%~dp0
9
+ if "%SDIR:~-1%"=="\" set SDIR=%SDIR:~0,-1%
10
+
11
+
12
+ "%JVM%" -classpath "%SDIR%\..\solr-webapp\webapp\WEB-INF\lib\*;%SDIR%\..\lib\ext" org.apache.solr.cloud.ZkCLI %*
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env bash
2
+
3
+ # You can override pass the following parameters to this script:
4
+ #
5
+
6
+ JVM="java"
7
+
8
+ # Find location of this script
9
+
10
+ sdir="`dirname \"$0\"`"
11
+
12
+
13
+ $JVM -classpath "$sdir/../solr-webapp/webapp/WEB-INF/lib/*:$sdir/../lib/ext/*" org.apache.solr.cloud.ZkCLI ${1+"$@"}
14
+
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
3
+ <Configure class="org.eclipse.jetty.webapp.WebAppContext">
4
+ <Set name="contextPath"><SystemProperty name="hostContext" default="/solr"/></Set>
5
+ <Set name="war"><SystemProperty name="jetty.home"/>/webapps/solr.war</Set>
6
+ <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"/>/etc/webdefault.xml</Set>
7
+ <Set name="tempDirectory"><Property name="jetty.home" default="."/>/solr-webapp</Set>
8
+ </Configure>
@@ -0,0 +1,37 @@
1
+ #!/bin/bash -ex
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
+ # This script shows how the solrtest.keystore file used for solr tests
21
+ # and these example configs was generated.
22
+ #
23
+ # Running this script should only be necessary if the keystore file
24
+ # needs to be replaced, which shouldn't be required until sometime around
25
+ # the year 4751.
26
+ #
27
+ # NOTE: the "-ext" option used in the "keytool" command requires that you have
28
+ # the java7 version of keytool, but the generated key will work with any
29
+ # version of java
30
+
31
+ echo "### remove old keystore"
32
+ rm -f solrtest.keystore
33
+
34
+ echo "### create keystore and keys"
35
+ keytool -keystore solrtest.keystore -storepass "secret" -alias solrtest -keypass "secret" -genkey -keyalg RSA -dname "cn=localhost, ou=SolrTest, o=lucene.apache.org, c=US" -ext "san=ip:127.0.0.1" -validity 999999
36
+
37
+
@@ -0,0 +1,205 @@
1
+ <?xml version="1.0"?>
2
+ <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
3
+
4
+ <!-- =============================================================== -->
5
+ <!-- Configure the Jetty Server -->
6
+ <!-- -->
7
+ <!-- Documentation of this file format can be found at: -->
8
+ <!-- http://wiki.eclipse.org/Jetty/Reference/jetty.xml_syntax -->
9
+ <!-- -->
10
+ <!-- =============================================================== -->
11
+
12
+
13
+ <Configure id="Server" class="org.eclipse.jetty.server.Server">
14
+
15
+ <!-- =========================================================== -->
16
+ <!-- Server Thread Pool -->
17
+ <!-- =========================================================== -->
18
+ <Set name="ThreadPool">
19
+ <!-- Default queued blocking threadpool -->
20
+ <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
21
+ <Set name="minThreads">10</Set>
22
+ <Set name="maxThreads">10000</Set>
23
+ <Set name="detailedDump">false</Set>
24
+ </New>
25
+ </Set>
26
+
27
+ <!-- =========================================================== -->
28
+ <!-- Set connectors -->
29
+ <!-- =========================================================== -->
30
+
31
+ <!--
32
+ <Call name="addConnector">
33
+ <Arg>
34
+ <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
35
+ <Set name="host"><SystemProperty name="jetty.host" /></Set>
36
+ <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
37
+ <Set name="maxIdleTime">50000</Set>
38
+ <Set name="Acceptors">2</Set>
39
+ <Set name="statsOn">false</Set>
40
+ <Set name="confidentialPort">8443</Set>
41
+ <Set name="lowResourcesConnections">5000</Set>
42
+ <Set name="lowResourcesMaxIdleTime">5000</Set>
43
+ </New>
44
+ </Arg>
45
+ </Call>
46
+ -->
47
+
48
+ <!-- This connector is currently being used for Solr because it
49
+ showed better performance than nio.SelectChannelConnector
50
+ for typical Solr requests. -->
51
+ <Call name="addConnector">
52
+ <Arg>
53
+ <New class="org.eclipse.jetty.server.bio.SocketConnector">
54
+ <Call class="java.lang.System" name="setProperty"> <Arg>log4j.configuration</Arg> <Arg>etc/log4j.properties</Arg> </Call>
55
+ <Set name="host"><SystemProperty name="jetty.host" /></Set>
56
+ <Set name="port"><SystemProperty name="jetty.port" default="8983"/></Set>
57
+ <Set name="maxIdleTime">50000</Set>
58
+ <Set name="lowResourceMaxIdleTime">1500</Set>
59
+ <Set name="statsOn">false</Set>
60
+ </New>
61
+ </Arg>
62
+ </Call>
63
+
64
+ <!-- if the connector below is uncommented, then jetty will also accept SSL
65
+ connections on port 8984, using a self signed certificate and can
66
+ optionally require the client to authenticate with a certificate.
67
+ (which can be the same as the server certificate_
68
+
69
+ # Run solr example with SSL on port 8984
70
+ java -jar start.jar
71
+ #
72
+ # Run post.jar so that it trusts the server cert...
73
+ java -Djavax.net.ssl.trustStore=../etc/solrtest.keystore -Durl=https://localhost:8984/solr/update -jar post.jar *.xml
74
+
75
+ # Run solr example with SSL requiring client certs on port 8984
76
+ java -Djetty.ssl.clientAuth=true -jar start.jar
77
+ #
78
+ # Run post.jar so that it trusts the server cert,
79
+ # and authenticates with a client cert
80
+ java -Djavax.net.ssl.keyStorePassword=secret -Djavax.net.ssl.keyStore=../etc/solrtest.keystore -Djavax.net.ssl.trustStore=../etc/solrtest.keystore -Durl=https://localhost:8984/solr/update -jar post.jar *.xml
81
+
82
+ -->
83
+ <!--
84
+ <Call name="addConnector">
85
+ <Arg>
86
+ <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
87
+ <Arg>
88
+ <New class="org.eclipse.jetty.http.ssl.SslContextFactory">
89
+ <Set name="keyStore"><SystemProperty name="jetty.home" default="."/>/etc/solrtest.keystore</Set>
90
+ <Set name="keyStorePassword">secret</Set>
91
+ <Set name="needClientAuth"><SystemProperty name="jetty.ssl.clientAuth" default="false"/></Set>
92
+ </New>
93
+ </Arg>
94
+ <Set name="port"><SystemProperty name="jetty.ssl.port" default="8984"/></Set>
95
+ <Set name="maxIdleTime">30000</Set>
96
+ </New>
97
+ </Arg>
98
+ </Call>
99
+ -->
100
+
101
+ <!-- =========================================================== -->
102
+ <!-- Set handler Collection Structure -->
103
+ <!-- =========================================================== -->
104
+ <Set name="handler">
105
+ <New id="Handlers" class="org.eclipse.jetty.server.handler.HandlerCollection">
106
+ <Set name="handlers">
107
+ <Array type="org.eclipse.jetty.server.Handler">
108
+ <Item>
109
+ <New id="Contexts" class="org.eclipse.jetty.server.handler.ContextHandlerCollection"/>
110
+ </Item>
111
+ <Item>
112
+ <New id="DefaultHandler" class="org.eclipse.jetty.server.handler.DefaultHandler"/>
113
+ </Item>
114
+ <Item>
115
+ <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler"/>
116
+ </Item>
117
+ </Array>
118
+ </Set>
119
+ </New>
120
+ </Set>
121
+
122
+ <!-- =========================================================== -->
123
+ <!-- Configure Request Log -->
124
+ <!-- =========================================================== -->
125
+ <!--
126
+ <Ref id="Handlers">
127
+ <Call name="addHandler">
128
+ <Arg>
129
+ <New id="RequestLog" class="org.eclipse.jetty.server.handler.RequestLogHandler">
130
+ <Set name="requestLog">
131
+ <New id="RequestLogImpl" class="org.eclipse.jetty.server.NCSARequestLog">
132
+ <Set name="filename">
133
+ logs/request.yyyy_mm_dd.log
134
+ </Set>
135
+ <Set name="filenameDateFormat">yyyy_MM_dd</Set>
136
+ <Set name="retainDays">90</Set>
137
+ <Set name="append">true</Set>
138
+ <Set name="extended">false</Set>
139
+ <Set name="logCookies">false</Set>
140
+ <Set name="LogTimeZone">UTC</Set>
141
+ </New>
142
+ </Set>
143
+ </New>
144
+ </Arg>
145
+ </Call>
146
+ </Ref>
147
+ -->
148
+
149
+ <!-- =========================================================== -->
150
+ <!-- extra options -->
151
+ <!-- =========================================================== -->
152
+ <Set name="stopAtShutdown">true</Set>
153
+ <Set name="sendServerVersion">false</Set>
154
+ <Set name="sendDateHeader">false</Set>
155
+ <Set name="gracefulShutdown">1000</Set>
156
+ <Set name="dumpAfterStart">false</Set>
157
+ <Set name="dumpBeforeStop">false</Set>
158
+
159
+
160
+
161
+
162
+ <Call name="addBean">
163
+ <Arg>
164
+ <New id="DeploymentManager" class="org.eclipse.jetty.deploy.DeploymentManager">
165
+ <Set name="contexts">
166
+ <Ref id="Contexts" />
167
+ </Set>
168
+ <Call name="setContextAttribute">
169
+ <Arg>org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern</Arg>
170
+ <Arg>.*/servlet-api-[^/]*\.jar$</Arg>
171
+ </Call>
172
+
173
+
174
+ <!-- Add a customize step to the deployment lifecycle -->
175
+ <!-- uncomment and replace DebugBinding with your extended AppLifeCycle.Binding class
176
+ <Call name="insertLifeCycleNode">
177
+ <Arg>deployed</Arg>
178
+ <Arg>starting</Arg>
179
+ <Arg>customise</Arg>
180
+ </Call>
181
+ <Call name="addLifeCycleBinding">
182
+ <Arg>
183
+ <New class="org.eclipse.jetty.deploy.bindings.DebugBinding">
184
+ <Arg>customise</Arg>
185
+ </New>
186
+ </Arg>
187
+ </Call>
188
+ -->
189
+
190
+ </New>
191
+ </Arg>
192
+ </Call>
193
+
194
+ <Ref id="DeploymentManager">
195
+ <Call name="addAppProvider">
196
+ <Arg>
197
+ <New class="org.eclipse.jetty.deploy.providers.ContextProvider">
198
+ <Set name="monitoredDirName"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
199
+ <Set name="scanInterval">0</Set>
200
+ </New>
201
+ </Arg>
202
+ </Call>
203
+ </Ref>
204
+
205
+ </Configure>