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 Mon, 06 Oct 2008 20:30:56 GMT

On Oct 6, 2008, at 4:19 PM, Matt Mitchell wrote:
> Awesome, thanks Erik! I really like the idea of bypassing SolrQuery,  
> and
> just using a straight up Hash. It'll be even easier to keep the API
> consistent between jruby and standard ruby now.

Here's a cute trick:

   query = {'qt' => 'standard', 'q'=>'*:*', 'facet.field' => 'cat'}
   response = solr.query(MapSolrParams.new(query))

But that doesn't work, as-is, with an array for the facet.field  
parameter, nor does it work for symbols, so this doesn't work for two  
reasons:

   solr.query(MapSolrParams.new(
      :qt => 'standard', :q=>'*:*', 'facet.field' => ['cat']
   )

Getting warmer!  :)

	Erik



Mime
View raw message