0
votes

Thank you in advance for bearing with me. I am new to Solr and looking to integrate into Rails. Although Postgres can text search, Solr seems to be faster..

I understand the modifications that need to happen to the models and controllers within the Rails app itself, however, I cannot seem to grasp when the xml files themselves will be defined and/or stored. Is there a configuration which points to a data source/xml file within Rails that I am missing? I understand that Solr runs and is launched right from the Sunspot gem, but how does that data source (in my case, xml files) communicate with the app? I am not sure if I understand how localhost:8983/solr is to interact with Rails as is would normally.

Any and all help is appreciated, many many thanks. I am running lion 10.7, ruby 1.9.7, rails 3.2.9, the sunspot gem... THANK YOU!

1

1 Answers

0
votes

Not sure if I'm answering all of your questions, but when you run the command:

rails generate sunspot_rails:install

it generates a file in the config directory called sunspot.yml. In that file, it specifies how to connect with a running SOLR database depending on your environment.

The Sunspot gem then looks at that file in order to know how to connect to SOLR.