Forum: Ruby on Rails [ANN] acts_as_solr v.0.7 released

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Thiago J. (Guest)
on 2007-02-16 20:57
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
you’d 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 J.
amit (Guest)
on 2007-04-20 04:26
(Received via mailing list)
Hi Thiago,

I am wondering how usually we get new release and various features
like highlighting etc. would be supported in any near term next
release. Secondly, which is the official mailing list for acts_as_solr
plugin.


-amit

On Feb 16, 11:57 am, Thiago J. <removed_email_address@domain.invalid>
This topic is locked and can not be replied to.