I have a VPS set up with several Rails apps, two of which are using Sunspot Solr. However, Solr is returning irrelevant results for a given search, and I believe the problem boils down to not having separated Sunspot/Solr to handle two Rails apps.
I have this in one app:
and this in the other:
class Article < ActiveRecord::Base
searchable do
text :title, :boost => 2.0
text :body do
strip_tags(body)
end
time :created_at
end
end
class Article < ActiveRecord::Base
searchable do
text :title, :body
end
end
My sunspot.yml files are basically identical:production: solr: hostname: localhost port: 8983 log_level: WARNING path: /solr/default solr_home: solr development: solr: hostname: localhost port: 8982 log_level: INFO path: /solr/development test: solr: hostname: localhost port: 8981 log_level: WARNING path: /solr/test
Is there a way to have 1 Solr instance index and deliver results for 2 Rails apps? I haven't found much documentation on this so am a bit confused as to how to do this.
Any help is much appreciated. Thanks!