Class: Sunspot::Rails::Server
- Inherits:
-
Solr::Server
- Object
- Solr::Server
- Sunspot::Rails::Server
- Defined in:
- sunspot_rails/lib/sunspot/rails/server.rb
Constant Summary
- LOG_LEVELS =
ActiveSupport log levels are integers; this array maps them to the appropriate java.util.logging.Level constant
%w(FINE INFO WARNING SEVERE SEVERE INFO)
Constants inherited from Solr::Server
AlreadyRunningError, JavaMissing, LOG_LEVELS, NotRunningError, SOLR_START_JAR, ServerError
Instance Attribute Summary
Attributes inherited from Solr::Server
bind_address, log_file, log_level, max_memory, min_memory, pid_dir, pid_file, port, solr_data_dir, solr_home, solr_jar
Instance Method Summary (collapse)
-
- (Object) bind_address
Address on which to run Solr.
-
- (Object) log_file
Log file for Solr.
-
- (Object) log_level
Severity level for logging.
-
- (Object) max_memory
Maximum Java heap size for Solr.
-
- (Object) min_memory
Minimum Java heap size for Solr.
-
- (Object) pid_dir
Directory in which to store PID files.
-
- (Object) pid_file
Name of the PID file.
-
- (Object) port
Port on which to run Solr.
-
- (Object) solr_data_dir
Directory to store lucene index data files.
-
- (Object) solr_home
Directory to use for Solr home.
-
- (Object) solr_jar
Solr start jar.
Methods inherited from Solr::Server
#bootstrap, #create_solr_directories, #initialize, #install_solr_home, #pid_path, #run, #start, #stop
Constructor Details
This class inherits a constructor from Sunspot::Solr::Server
Instance Method Details
- (Object) bind_address
Address on which to run Solr
50 51 52 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 50 def bind_address configuration.bind_address end |
- (Object) log_file
Log file for Solr. File is in the rails log/ directory.
72 73 74 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 72 def log_file File.join(::Rails.root, 'log', "sunspot-solr-#{::Rails.env}.log") end |
- (Object) log_level
Severity level for logging. This is based on the severity level for the Rails logger.
65 66 67 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 65 def log_level LOG_LEVELS[::Rails.logger.level] end |
- (Object) max_memory
Maximum Java heap size for Solr
86 87 88 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 86 def max_memory configuration.max_memory end |
- (Object) min_memory
Minimum Java heap size for Solr
79 80 81 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 79 def min_memory configuration.min_memory end |
- (Object) pid_dir
Directory in which to store PID files
11 12 13 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 11 def pid_dir configuration.pid_dir || File.join(::Rails.root, 'tmp', 'pids') end |
- (Object) pid_file
Name of the PID file
18 19 20 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 18 def pid_file "sunspot-solr-#{::Rails.env}.pid" end |
- (Object) port
Port on which to run Solr
57 58 59 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 57 def port configuration.port end |
- (Object) solr_data_dir
Directory to store lucene index data files
Returns
String | data_path |
29 30 31 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 29 def solr_data_dir configuration.data_path end |
- (Object) solr_home
Directory to use for Solr home.
36 37 38 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 36 def solr_home File.join(configuration.solr_home) end |
- (Object) solr_jar
Solr start jar
43 44 45 |
# File 'sunspot_rails/lib/sunspot/rails/server.rb', line 43 def solr_jar configuration.solr_jar || super end |