Skip to content

Latest commit

 

History

History
 
 

sunspot_rails

Sunspot::Rails for Distributed Search

You might want to search from multiple cores in one call if you had solr index distributed across more than one cores (solr instances)

Check this out to learn more about distributed search using shards - wiki.apache.org/solr/DistributedSearch

Installation Instructions from the original README

* github.com/outoftime/sunspot * github.com/outoftime/sunspot/tree/master/sunspot_rails/

Sample sunspot.yml for distributed search

If you want to search from localhost:8982/solr and localhost:8983/solr by first hitting localhost:8982/solr, your configuration for development environment would look something like this,

production:

solr:
  hostname: localhost
  port: 8983
  log_level: WARNING

development:

solr:
  hostname: localhost
  port: 8982
  log_level: INFO
  shards: "localhost:8982/solr,localhost:8983/solr"

Gemfile for Rails 3 app

The Gemfile should include sunspot_rails from this repo.

gem ‘sunspot_rails’, :git => ‘git://github.com/shettigarc/sunspot.git’

Further Reading

Reading the Sunspot documentation is highly recommended. Sunspot::Rails exists to wrap Sunspot with a Rails-friendly API, but almost all of the functionality you use in Sunspot::Rails is implemented in Sunspot.

My Blog

shettigarc.com/blogs