mwmitchell/rsolr-ext — Issue #18: Double 'rows' parameter to solr with RSolr 1.0.3
Author: cbeer
Created: 2011-11-14 19:53:26+00:00
State: open

I have a RSolr::Client instance (managed through RSolr::Ext)

> Blacklight.solr
```ruby
#, @proxy=nil, @connection=#>, @options={:url=>"http://127.0.0.1:8983/solr"}>
```

When I add a :per_page parameter, the query to solr has two 'rows' parameters, which get interpreted as an array on the way back out and throw the following error:
> Blacklight.solr.find :per_page => 10

INFO: [] webapp=/solr path=/select params={wt=ruby&start=0&rows=10&rows=10} hits=30 status=0 QTime=5
```ruby
NoMethodError: undefined method `to_i' for ["10", "10"]:Array
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@blacklight/gems/rsolr-ext-1.0.3/lib/rsolr-ext/response.rb:27:in `rows'
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@blacklight/gems/rsolr-ext-1.0.3/lib/rsolr-ext/response/docs.rb:8:in `extended'
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@blacklight/gems/rsolr-ext-1.0.3/lib/rsolr-ext/response.rb:17:in `extend'
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@blacklight/gems/rsolr-ext-1.0.3/lib/rsolr-ext/response.rb:17:in `initialize'
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@blacklight/gems/rsolr-ext-1.0.3/lib/rsolr-ext/client.rb:24:in `new'
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@blacklight/gems/rsolr-ext-1.0.3/lib/rsolr-ext/client.rb:24:in `find'
from (irb):18
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@global/gems/railties-3.1.1/lib/rails/commands/console.rb:45:in `start'
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@global/gems/railties-3.1.1/lib/rails/commands/console.rb:8:in `start'
from /Users/chris_beer/.rvm/gems/ruby-1.9.3-p0@global/gems/railties-3.1.1/lib/rails/commands.rb:40:in `'
from script/rails:6:in `require'
from script/rails:6:in `

'
```

Thanks