lucene-ruby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <e...@ehatchersolutions.com>
Subject Re: jruby and solrj
Date Tue, 07 Oct 2008 03:40:02 GMT
I've created a simple bare minimum server.rb that - similar to SolrJ's  
SolrServer abstraction in (currently mostly empty) methods.

And in test/ I've checked in a JRuby example showing the difference  
between going through a pure Ruby API and the SolrJ API.  You can run  
it this way from the root of the solr-ruby-refactoring branch:

    jruby -Ilib test/temp.rb

I think the goal is to achieve something like this being equivalent  
for both MRI and SolrJ-Ruby, regardless of the solr object type:

   response = eval(solr.request(:qt => 'standard', :q => '*:*',  
'facet.field' => ['cat'], :wt=>'ruby'))
   puts response['response']['numFound']

Not quite sure where the eval belongs, so I left it out of  
Solr::Server for now.  We want to be able to support raw responses  
through solr-ruby also, for use cases like letting Solr's JSON  
response pass through a Ruby application server (or perhaps even to  
use JSON within solr-ruby, if it parses faster).

Shouldn't be too hard to get there from here, eh Matt?

	Erik


Mime
View raw message