lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "Ruby Response Format" by EricPugh
Date Wed, 02 Nov 2011 15:22:18 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "Ruby Response Format" page has been changed by EricPugh:
http://wiki.apache.org/solr/Ruby%20Response%20Format?action=diff&rev1=24&rev2=25

Comment:
At least with Ruby 1.9.2, you don't need to pass the nil in.

  require 'net/http'
  
  h = Net::HTTP.new('localhost', 8983)
- hresp, data = h.get('/solr/select?q=iPod&wt=ruby', nil)
+ hresp, data = h.get('/solr/select?q=iPod&wt=ruby')
  rsp = eval(data)
  
  puts 'number of matches = ' + rsp['response']['numFound'].to_s

Mime
View raw message