Bigindex-Solr¶ ↑
Add the power of the Solr search server to your Rails application with this easy to use gem.
This is meant to be used with Bigindex [github.com/openplaces/bigindex] in order to provide indexing functionality to your Rails application.
The version of this project corresponds to the version of Solr that’s packaged along with it.
Requirements¶ ↑
-
Java 1.6+ (It also requires that the command line tool “java” be accessible from the account you’re trying to run this from)
-
Although it’s not required to get this gem working, Bigindex should be installed and working with your Rails application in order to actually interface with Solr. You could of course install this package standalone if all you wanted was Solr.
Usage¶ ↑
(1) Add the following line to your RAILS_ROOT/config/environment.rb
config.gem "bigindex-solr", :source => "http://gemcutter.org"
(2) Add the following line to the bottom of your RAILS_ROOT/Rakefile
require 'bigindex-solr/tasks'
(3) Run the following rake task to generate a config for your Rails application
rake bigindex:solr:generate_config
(4) Modify RAILS_ROOT/config/bigindex.yml to start up on a specified port of your choice
(5) Start up your Solr server
rake bigindex:solr:start
Optional: You can also define the ‘java’ binary to start up Solr with by sending it a JAVA_BIN argument:
rake bigindex:solr:start JAVA_BIN=/path/to/other/java
(6) Stop your Solr server when you’re done
rake bigindex:solr:stop
Alternate usage¶ ↑
You can also install Bigindex-Solr as a plugin by running:
script/plugin install git://github.com/openplaces/bigindex-solr.git
and continuing with step (4) in the previous section.
Advanced configurations¶ ↑
It’s possible to define what JVM options to start up Solr with. Just edit the RAILS_ROOT/config/bigindex.yml similarly to this:
development: adapter: solr solr_url: http://localhost:8981/solr jvm_options: -Xms64m -Xmx512m
Solr schema¶ ↑
Bigindex has a defined schema to use with Solr. If you need to set up Solr yourself, you’ll need to either use the schema.xml defined in this project, or create a merged version of it with your own.
Note on Patches/Pull Requests¶ ↑
-
Fork the project.
-
Make your feature addition or bug fix.
-
Add tests for it. This is important so I don’t break it in a future version unintentionally.
-
Commit, do not mess with rakefile, version, or history. (if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
-
Send me a pull request. Bonus points for topic branches.
Credits¶ ↑
This project was derived from acts_as_solr
LICENSE¶ ↑
This project is released under the MIT license.
Copyright¶ ↑
Copyright © 2009 openplaces.org. See MIT-LICENSE for details.