I'm using Sunspot Solr on Rails for search.
In my class definition I have something like this (simplified from my real one):
searchable do
text :name
integer :count
boolean :priority
end
Is there any way for me to access the integer and boolean field for their values directly in the hit results from a search?
I see there is the option to set up attribute fields with stored => true
, which makes them available to the hit objects. However, the integer and boolean fields are clearly already stored as-is somewhere, as I'm capable of sorting and filtering them, just not accessing them through the hit object's stored method, so is there any way I can get them out for display?
If the answer to this is no, what exactly is stored => true
doing when passed to an integer or boolean field?
I have a fairly large index on Websolr, and reindexing over this with stored => true
would be a bit prohibitive.