How to initialize more than one Solr instance using the same document class?

StackOverflow https://stackoverflow.com/questions/3902920

  •  29-09-2019
  •  | 
  •  

문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top