Skip to content
This repository has been archived by the owner on Jul 11, 2020. It is now read-only.

Commit

Permalink
Fix up the rest of the local Solr instance management.
Browse files Browse the repository at this point in the history
  • Loading branch information
nz committed Jun 3, 2011
1 parent 4e474f1 commit b95742d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ log/*.log
tmp/
.sass-cache/
*.rbc
solr/data
4 changes: 4 additions & 0 deletions lib/tasks/solr.rake
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
namespace :solr do

task :run => :environment do
solr_port = {'test' => 8981, 'development' => 8982 }[Rails.env] || 8983
system %(
cd vendor/solr &&
java \
-Dsolr.solr.home=#{Rails.root.join('solr')} \
-Dsolr.data.dir=#{Rails.root.join('solr/data', Rails.env)} \
-Djava.util.logging.config.file=#{Rails.root.join('solr/conf/logging.properties')} \
-Djetty.port=#{solr_port} \
-jar start.jar
)
end
Expand Down
6 changes: 6 additions & 0 deletions solr/conf/logging.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
handlers = java.util.logging.ConsoleHandler
.handlers = java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level = INFO
java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO
org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = java.util.logging.ConsoleHandler

0 comments on commit b95742d

Please sign in to comment.