How to initialize more than one Solr instance using the same document class?
-
29-09-2019 - |
Question
In Solr I have two cores. The schema is the same but they have different documents.
Now I would like to have only one document class and initialize Solr for those two cores using the same document class. For example:
Startup.Init("http://localhost:8983/solr/core1"); Startup.Init("http://localhost:8983/solr/core2");
But I get exception saying the key is already registered.
What is the solution?
Thanks.
Solution
From the docs:
The built-in container (Startup) is currently limited to access multiple cores/instances with different mapped types.
So you can either contribute to the project to lift this limit, or switch to Windsor or StructureMap.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow