Nick Martin
unread,Dec 9, 2010, 4:24:42 PM12/9/10Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to rsolr
Hi Matt, All,
I was trying a couple of solr.get examples in the readme on github for
rsolr:
# send a request to /select
response = solr.get 'select', :params => {:q => '*:*'}
But this raises:
ruby-1.9.2-p0 > response = solr.get 'select', :params => {:q => '*:*'}
TypeError: can't convert String into Hash
from /home/nick/.rvm/gems/ruby-1.9.2-p0/gems/rsolr-0.12.1/lib/
rsolr/client.rb:90:in `merge'
from /home/nick/.rvm/gems/ruby-1.9.2-p0/gems/rsolr-0.12.1/lib/
rsolr/client.rb:90:in `map_params'
from /home/nick/.rvm/gems/ruby-1.9.2-p0/gems/rsolr-0.12.1/lib/
rsolr/client.rb:34:in `request'
from /home/nick/.rvm/gems/ruby-1.9.2-p0/gems/rsolr-0.12.1/lib/
rsolr/client.rb:16:in `method_missing'
from (irb):65
from /home/nick/.rvm/rubies/ruby-1.9.2-p0/bin/irb:16:in
`<main>'
Doing:
response = solr.select({:q=>'*:*'})
Works fine.
Just wondered if you could clarify why the error was happening. I'm
new to Ruby so perhaps it's something obvious to one of you.
Many thanks
Nick