开发者

Solr Connection' already registered in container

开发者 https://www.devze.com 2023-01-17 12:56 出处:网络
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

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 th开发者_运维知识库at how can i remove it...


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.


My Solution is clear Startup before Init

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号