Solr Connection'已在容器中注册 [英] Solr Connection' already registered in container
问题描述
我在asp.net上使用solr搜索
i am using solr search on asp.net
当我第一次搜索时,它会给我正确的搜索结果,之后,当我更改搜索参数并尝试搜索它时,bt会给出错误("Solr Connection'已在容器中注册")
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")
所以zl建议我如何删除它...
so pl z suggest me that how can i remove it...
推荐答案
通过在Global.asax的Application_Start事件中放置类似于以下内容的内容,确保仅初始化一次与Solr实例的连接.文件.
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");
Startup.Init("http://localhost:8983/solr");
您可以张贴一个代码片段来说明如何打开SolrConnection并针对Solr实例进行查询吗?您正在使用哪个版本的SolrNet库?
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?
我正在使用上述约定在ASP.NET应用程序中使用SolrNet版本0.2.3.
I am using SolrNet version 0.2.3 in an ASP.NET application using the convention described above.
这篇关于Solr Connection'已在容器中注册的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!