Solr Connection' already registered in container

女生的网名这么多〃 提交于 2019-12-07 14:11:35

问题


i am using solr search on asp.net

when i search first time it give me correct search result, bt after that when i change search parameter and try to search it give an error ("Solr Connection' already registered in container")

so pl z suggest me that how can i remove it...


回答1:


Make sure that you are only initializing the connection to the Solr instance once, by putting something similar to the following in the Application_Start event in the Global.asax. file.

Startup.Init("http://localhost:8983/solr");

Can you post a code snippet of how you are opening the SolrConnection and querying against the Solr instance? What version of the SolrNet library are you using?

I am using SolrNet version 0.2.3 in an ASP.NET application using the convention described above.




回答2:


My Solution is clear Startup before Init

Startup.Container.Clear();
Startup.InitContainer();
Startup.Init<T>("http://localhost:8983/solr/test");


来源:https://stackoverflow.com/questions/3801674/solr-connection-already-registered-in-container

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!