acts_as_solr v.0.7 has been released, and the changes are:
NEW: You can now specify the field types when indexing and searching if
youd like to preserve its original type. Important: Make sure you
update your schema.xml file.
Indexing
Each field passed can also be a hash with the value being a field type
class Electronic < ActiveRecord::Base
acts_as_solr :fields => [{:price => :range_float}, {:current_time =>
:date}]
def current_time
Time.now
end
end
Searching
Electronic.find_by_solr "ipod AND price:[* TO 59.99]",
:field_types => [{:price => :range_float}]
The field types accepted are:
:float: Index the field value as a float (ie.: 12.87)
:integer: Index the field value as an integer (ie.: 31)
:boolean: Index the field value as a boolean (ie.: true/false)
:date: Index the field value as a date (ie.: Wed Nov 15 23:13:03 PST
2006)
:string: Index the field value as a text string, not applying the same
indexing filters as a regular text field
:range_integer: Index the field value for integer range queries (ie.:[5
TO 20])
:range_float: Index the field value for float range queries (ie.:[14.56
TO 19.99])
Setting the field type preserves its original type when indexed
FIX: Fixing sorting bug. Thanks for the catch Laurel
FIX: Fixing small bug when installing the plugin
NEW: Adding the :additional_fields option to the acts_as_solr method
Home => http://acts-as-solr.rubyforge.org/
SVN => http://opensvn.csie.org/acts_as_solr/trunk
--
Thiago Jackiw
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---