Questions tagged [sunspot-rails]

Sunspot Rails Plugin

Sunspot Rails is a Rails plugin that provides drop-in integration of the Sunspot[http://outoftime.github.com/sunspot] Solr search library with Rails

411 questions
0
votes
1 answer

Solr Error "no segments* file found in NRTCachingDirectory"

I'm new to ruby on rails, and I am toying around with the Sunspot_Rails Gem. My gemfile looks like this gem "sunspot_rails" group :development do gem 'sqlite3', '1.3.8' gem 'better_errors' gem 'binding_of_caller' gem 'sunspot_solr' end…
Peege151
  • 1,562
  • 2
  • 21
  • 45
0
votes
1 answer

RSolr::Error::Http in PostsController#index

I had it working in develoment mode but when I messed around to get it in production mode something went wrong. I've been at this for 4 hours. I uninstalled the gems sunspot_rails and sunspot_solr and deleted all the files associated with them and…
franklinexpress
  • 1,149
  • 14
  • 44
0
votes
1 answer

Sunspot returning empty results

I am using Sunspot for search and my queries aren't returning any results. I am using an API to do the search. Here is some relevant code: class App < ActiveRecord::Base searchable do text :name, :boost => 5 text :description …
theDazzler
  • 1,039
  • 2
  • 11
  • 27
0
votes
1 answer

Nested search in solr

I have an Activity model and ActivityOccurrence Model where Activity has_many :activity_occurrences Activity: This model will have all the meta data required by ActivityOccurrence AcitvityOccurrence: attrs - occurrence(datetime), completed. Now we…
0
votes
1 answer

Websolr solr version

We are looking to use the 'soft commit' feature in Solr4 to support near real time search for our production application on Heroku. Does Websolr on Heroku support Solr4? If yes, is it possible to use the sunspot rails gem to play nicely with a…
Ramnath
  • 67
  • 6
0
votes
1 answer

Using sunspot_solr search array of values

Hi, I built a Ruby on Rails application with Sunspot Solr for searching. @search = Answer.search do with(:question_id, @question_ids) paginate :page => 1, :per_page => Answer.count end return question_id Here i want to search this Answer…
0
votes
0 answers

Rails 3 app crashes after Sunspot installation on development env

I used this guide to install Sunspot. I successfully run folowing commands: **Add to Gemfile**: gem 'sunspot_rails' gem 'sunspot_solr' # optional pre-packaged Solr distribution for use in development Bundle it! bundle install **Generate a default…
Edgars
  • 913
  • 1
  • 19
  • 53
0
votes
2 answers

sunspot surely this can be done with some ruby magic?

I need to access my rails model instance from inside the searchable block as indicated below. class Product include MongoMapper::Document include Sunspot::Rails::Searchable key :field_names, Array searchable do…
Rick Moss
  • 926
  • 1
  • 17
  • 34
0
votes
1 answer

Rails and Solr: filter by facet with rows

I'm having trouble with faceted search over an integer field, that is a counter cache for associated records of this model. Basically: Post.solr_search do facet(:comments_count) do row('No') { with(:comments_count).less_than 1 } …
ichigolas
  • 7,595
  • 27
  • 50
0
votes
1 answer

Issue using solr and rspec

I have a method which prompts auto complete. I am using Solr for the same. The method in the controller looks like: def address_autocomplete search = Sunspot.search(Address) do fulltext params[:term] with(:user_id, current_user.id) …
Radhika
  • 2,453
  • 2
  • 23
  • 28
0
votes
1 answer

Ruby on Rails - SunSpot doesn't return anything

When I search a model, sunspot doesn't return anything: routes.rb get 'product/:q' => 'store#product' store_controller.rb if (!!(params[:q] =~ /^[-+]?[0-9]+$/)) == false #if no number @note = "hello" @search = Product.search do fulltext…
hansottowirtz
  • 664
  • 1
  • 6
  • 16
0
votes
0 answers

Sunspot .index: FloatDomainError: Infinity

I have a large database of products (>23.000), and when I made a change to my schema.xml or in the search definitions of sunspot, I want to re-index all products. But sometimes the re-index fails with the following error: FloatDomainError: Infinity …
23tux
  • 14,104
  • 15
  • 88
  • 187
0
votes
1 answer

Exception thrown starting SOLR in Sunspot gem

I just installed sunspot gem (latest version) including the embedded solr into my application. When I run "rake sunspot:solr:start" it says the server started, but then I can't connect and I think it dies quietly - I cannot find the log file for…
Richard G
  • 5,243
  • 11
  • 53
  • 95
0
votes
1 answer

Sunspot_rails returns no results for has_many relationship

I have an application with a relationship such that a User has_many Tags. I am trying to set up the sunspot_rails gem to be able to search the user's name (working fine) as well as their associated tags. My controller code is the…
trevwilson
  • 95
  • 1
  • 1
  • 6
0
votes
2 answers

Accessing belongs_to association data in Sunspot results

I'm working on getting my head around Sunspot and am having trouble accessing data from an associated model in Sunspot search results. I have a Room model with fields: id, room_name, capacity, location_id. It looks like this: class Room <…