sunspot / sunspot

Solr-powered search for Ruby objects
http://sunspot.github.com/
MIT License
2.98k stars 919 forks source link

Multicore setup #518

Open clupprich opened 10 years ago

clupprich commented 10 years ago

In our current project we're having a multilingual site which would be best used to have multiple Solr cores in the background (spelling, different configuration, etc. is all a factor here). Currently, at least from what I know about sunspot and sunspot-rails, it doesn't support a true multicore setup (besides the staging configuration, which can make use if multiple cores).

Although for our current project time is running out and we will have to disable certain features for some languages, I would set some time aside in the next few months and add this feature to sunspot and sunspot-rails.

Now I before I start with it, I would love to get your feedback on the principal idea and on parts of the implementation. I though about injecting some lambda function into the connection/session handler which dynamically decides which connection/session to return from a pool of lazy initialized connections. This way one could select a session based on the locale or even a random number, to split connections eavenly.

Any comments/feedback/ideas?

ma2kubo commented 10 years ago

Evernote was unable to submit your note for the following reason:

The emailed note was received, but Evernote did not understand the email address. It may have been mistyped, or the user may not exist. Please check to make sure the address was properly entered.

Original message information: From: Christoph Lupprich <notifications@github.com> Delivered To: deviceone.c1297@m.evernote.com All recipients: sunspot/sunspot <sunspot@noreply.github.com> Subject: [sunspot] Multicore setup (#518)

To prevent excessive emails, you may not receive another error reply for the next 360 minutes.

navied commented 10 years ago

It would be nice to have the ability to set certain models to certain cores as well.

ma2kubo commented 10 years ago

Evernote was unable to submit your note for the following reason:

The emailed note was received, but Evernote did not understand the email address. It may have been mistyped, or the user may not exist. Please check to make sure the address was properly entered.

Original message information: From: navied <notifications@github.com> Delivered To: deviceone.c1297@m.evernote.com All recipients: sunspot/sunspot <sunspot@noreply.github.com>; ma2kubo <ma2kubo@gmail.com> Subject: Re: [sunspot] Multicore setup (#518)

To prevent excessive emails, you may not receive another error reply for the next 360 minutes.