Re: format of sort parameter in Solr::Request::Standard

2009-10-12 Thread Erik Hatcher
I've just pushed a new 0.0.8 gem to Rubyforge that includes the fix I described for the sort parameter. Erik On Oct 12, 2009, at 11:03 AM, Paul Rosen wrote: I did an experiment that worked. In Solr::Request::Standard, in the to_hash() method, I changed the commented line below to t

Re: format of sort parameter in Solr::Request::Standard

2009-10-12 Thread Erik Hatcher
Paul- Trunk solr-ruby has this instead: hash[:sort] = @params[:sort].collect do |sort| key = sort.keys[0] "#{key.to_s} #{sort[key] == :descending ? 'desc' : 'asc'}" end.join(',') if @params[:sort] The ";sort..." stuff is now deprecated with Solr itself I suppose the 0.8 gem

Re: format of sort parameter in Solr::Request::Standard

2009-10-12 Thread Paul Rosen
I did an experiment that worked. In Solr::Request::Standard, in the to_hash() method, I changed the commented line below to the two lines following it. sort = @params[:sort].collect do |sort| key = sort.keys[0] "#{key.to_s} #{sort[key] == :descending ? 'desc' : 'asc'}" end.j

Re: format of sort parameter in Solr::Request::Standard

2009-10-11 Thread Shalin Shekhar Mangar
On Fri, Oct 9, 2009 at 9:55 PM, Paul Rosen wrote: > Hi all, > > I'm using solr-ruby 0.0.7 and am having trouble getting Sort to work. > > I have the following statement: > > req = Solr::Request::Standard.new(:start => start, :rows => max, > :sort => [ :title_sort => :ascending ], > :query => que