RSolr beta5

6 views
Skip to first unread message

matt mitchell

unread,
Oct 28, 2010, 9:25:55 PM10/28/10
to rsolr
Well it's taking a little longer than expected, but I'm getting there.
I've had some great feedback from the community and I feel that RSolr
is distilling into a nice little baby 1.0... beta5!

Some of the main changes are:

The method signatures for request methods use a :params hash for solr
query values. For example:
solr.select :params => {:q => "test"}

You can use the :data key to send POST requests for searches:
solr.select :data => {:q => "test"}

HEAD requests are possible via #head:
solr.head "admin/ping"

Every object returned from a request contains a #request and #response
attribute. The #request attribute contains the original data sent to
Solr (debugging/logging goodness). The #response object
contains :body, :headers and :status values.

RSolr also has built-in support for pagination, The ["response"]
["docs"] array is WillPaginate ready:
solr.paginate 1, 10, "select", :params => {:q => "test"}

There are also EventMachine and Ruby 1.9 EventMachine + Fibers drivers
in the works.

So, I'm really looking for some of you to try it out and let me know
how it all works. Lots has changed, but the docs should be up to date
(mostly) and I'm glad to help. RSolr::Ext and friends won't be
compatible at this point, but the work to adapt should be minimal.

So, check it out:

[sudo] gem install rsolr --prerelease

Here are some example snippets:

http://github.com/mwmitchell/rsolr/blob/master/example.rb

Thanks,
Matt
Reply all
Reply to author
Forward
0 new messages