0
votes

I'm a little confused about the use of sunspot with solr. I worked with solr and nutch, let's say that I have solr with all my data indexed by nutch and now I want to configure sunspot, only to search data in solr, not to index to it.

I have been investigating but, the info I saw is always about configuring models first, to index to solr.

Take a look below, how can I configure controllers in Ruby on Rails with sunspot to get these results from my solr?

{
   "content": "Varadero es la mejor playa de Cuba, recientemente se remodelo",
   "title": "Varadero ampliada la Internet",
   "segment": "20131114152100",
   "boost": 1,
   "digest": "e6cc9412d5066dae9e176fd7bc598913",
   "tstamp": "2013-11-14T15:47:55.235Z",
   "id": "http://blogs.uclv.edu.cu/blog/1039#main-content",
   "url": "http://blogs.uclv.edu.cu/blog/1039#main-content",
   "_version_": 1451712964205740000
}

Thanks in advance for your time

1

1 Answers

0
votes

Sunspot is designed to index/search ActiveRecord models. It adds a search method to the models.

If you are not using ActiveRecord or some other database persistence for these items in your Rails application, you should just use rsolr, not sunspot.