Skip to content

Issue 83: Support for multi core using ServiceLocator#5

Closed
paulbouwer wants to merge 3 commits into
SolrNet:masterfrom
paulbouwer:master
Closed

Issue 83: Support for multi core using ServiceLocator#5
paulbouwer wants to merge 3 commits into
SolrNet:masterfrom
paulbouwer:master

Conversation

@paulbouwer

Copy link
Copy Markdown

Hi Mauricio

I've implemented this feature to support a multi-tenancy requirement. I have added new tests and updated some existing tests. All pass. The following is an example of how to use it.

Startup.InitCore<TestDocument>("core1", "http://localhost");
Startup.InitCore<TestDocument>("core2", "http://localhost");
var solrOperations1 = ServiceLocator.Current.GetInstance<ISolrOperations<TestDocument>>("core1");
var solrOperations2 = ServiceLocator.Current.GetInstance<ISolrOperations<TestDocument>>("core2");

You can still use the existing Init method without cores:

Startup.Init<TestDocument>("http://localhost");
var solrOperations = ServiceLocator.Current.GetInstance<ISolrOperations<TestDocument>>();

Hope it helps.

Paul

@mausch

mausch commented Dec 9, 2010

Copy link
Copy Markdown
Member

Nice! But the commit shows up as a complete modification of all involved files, so it makes reviewing it nearly impossible. It seems to be an issue with autocrlf settings in git. Can you try setting core.autocrlf to true and re-committing? Thanks

@paulbouwer

Copy link
Copy Markdown
Author

I've only just started using Git and still getting up to speed on it - how would I go about doing this. I ran the following commands:

  • git config core.autocrlf true
  • git commit --amend -m "Issue 83: Support for multi core using ServiceLocator"
  • git push -f origin master

The commit still shows complete modification of all involved files.

I obtained a raw copy of your version of one of the files I committed and it seems to only have LF line endings (https://github.com/mausch/SolrNet/raw/master/SolrNet/Utils/Container.cs). My files have CRLF. Should I change my files to LF only and recommit ?

Thanks

@mausch

mausch commented Dec 12, 2010

Copy link
Copy Markdown
Member

Applied in 94505a6, thanks!

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants