The Connection is not for parameters, merely the base URL to the Solr
server (or core, which is effectively a Solr "server").
As of solr-ruby 0.0.6, the shards parameter is supported for the
Solr::Request::Standard and Dismax request objects, so you'd simply
specify :shards=>"...." for those queries.
Also note that you can specify the shards in solrconfig.xml for the
request handler mapping(s) and avoid having to send it from the client
(depends on your needs whether that makes sense or not).
Erik
On Sep 9, 2009, at 10:17 PM, Paul Rosen wrote:
Hi Erik,
Yes, I've been doing that in my tests, but I also have the case of
wanting to do a search over all the cores using the shards syntax. I
was thinking that the following wouldn't work:
solr =
Solr::Connection.new('http://localhost:8983/solr/core0/select?shards=localhost:8983/solr/core0,localhost:8983/solr/core1')
because it has a "?" in it.
Erik Hatcher wrote:
With solr-ruby, simply put the core name in the URL of the
Solr::Connection...
solr = Solr::Connection.new('http://localhost:8983/solr/core_name')
Erik
On Sep 9, 2009, at 6:38 PM, Paul Rosen wrote:
Hi all,
I'd like to start experimenting with multicore in a ruby on rails
app.
Right now, the app is using the solr-ruby-rails-0.0.5 to
communicate with solr and it doesn't appear to have direct support
for multicore and I didn't have any luck googling around for it.
We aren't necessarily wedded to using solr-ruby-rails-0.0.5, but I
looked at rsolr very briefly and didn't see any reference to
multicore there, either.
I can certainly hack something together, but it seems like this is
a common problem.
How are others doing multicore from ruby?
Thanks,
Paul