Hey everybody!
I'm trying to use to sunspot for the first time and I've been banging against the wall for some reason. Bear with the noob here :)
So here's the deal: I follow the very first steps to make a model searchable. I try to perform a search and, for some reason, I get all records anyway.
Given:
- A Project model that looks like this:
- class Project < ActiveRecord::Base
has_many :tasks
validates :name, presence: true
searchable do
text :name
end
end
- The following list of name I have for project models (among many others I have):
- Essential Ruby Libraries
- Get Started With Ruby on Rails
- Taking a Feature to Exhaustion
- Let's Learn Ember
- Test-Driven Development in Ruby
When I search for 'exhaustion' with:
Project.search { fulltext 'exhaustion' }.result, I get all 37 records I have.
What's wrong with the picture? Am I missing something?