如何扩展/修改用于SolrConnection对象的超时值?
我有一个长期运行的优化操作,它似乎没有在提供的默认连接超时内完成。我使用的操作是ISolrOperations<?>.Optimize()。我没有看到任何直接使用ISolrOperations对象来增加超时的选项。
我使用 IoC容器进行实例化,以便拥有多个内核。
下面是完整的堆栈跟踪:
SolrNet.Exceptions.SolrConnectionException: The operation has timed out ---> System.Net.WebException: The operation
我在向solr查询时遇到了一个问题,当我的页面更大时,75我得到了错误--一个现有连接被远程主机强制关闭了。
有谁能帮我解决这个问题吗。
这是堆栈跟踪
at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size)
at System.IO.StreamReader.ReadBuffer()
at System.IO.StreamReader.ReadToEnd()
at SolrNet.Impl.SolrConnection.GetResponse(IHttpWebRequest reque
我注意到的最新版本支持集成。
这篇讨论了如何与现有的容器(StructureMap,Windsor等)集成,但我找不到任何关于如何与Autofac集成的示例。
由于我们使用的是Autofac 2.5.2,我添加了一个来自旧版本的程序集重定向,这是SolrNet想要的:
<runtime>
<!-- SolrNet wants to use an old version of Autofac -->
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
我用c#语言在视频演播室上建立了一个网站,我在我的网站上使用了solrnet,我通过连接到它的服务器,一切都很好,直到我把这个网站发布在godaddy上,我再也无法连接到solr了。我用publicIp:8983/solr代替了publicIp:8983/solr
错误:
SolrNet.Exceptions.SolrConnectionException: Unable to connect to the remote server ---> System.Net.WebException: Unable to connect to the remote server --->
我尝试了以下方法:
Dim q = New SolrQueryByField("tag", keyword) With {.Quoted = False} Or New SolrQueryByField("cat", keyword) With {.Quoted = False} Or New SolrQueryByField("shortname", keyword) With {.Quoted = False}
Dim loc As New Location(latitude, longitude)
Dim qgeo = New SolrQ
为什么SolrNet连接的容器保持静态?这是一个非常大的错误,因为在我们的应用程序中,当我们向应用程序发送异步请求时,SolrNet的行为就会异常。如何在SolrNet中避免这个问题?
class P
{
static void M(string[] a)
{
Thread t = new Thread(delegate()
{
f1();
});
Thread t1 = new Thread(delegate()
{
f2();
}
使用solrnet.dll和Microsoft.Practices.ServiceLocation.dll在Tomcate windows xp和solrNet上运行,我收到错误,远程服务器返回错误。(400)错误请求。
在此代码上添加内容时
solr.Add(new Article()
{
_id = 1,
_title = "My Laptop",
_content = "My laptop is portable power station",
_tags = new List<
我正在使用SolrNet,当我传递一个包含冒号的查询时,我收到这个错误:
Apache Tomcat/6.0.32 - Error report
The request sent by the client was syntactically incorrect (null).
代码示例如下所示:
var results = SolrOps.Query(request.Query, new QueryOptions
{
SpellCheck = new SolrNet.Commands.Parameters.SpellCheckingPa
我在机器192.168.0.113(Centos 5.5)中设置了运行在Tomcat中的solr服务器。我在matchine 192.168.0.114(Windows server 2003)中部署了一个网站。我在matchine 192.168.0.114中使用solrnet。下面这样的完整代码(感谢@Paige Cook进行了编辑):
using System;
using System.Collections.Generic;
using System.Text;
using SolrNet;
using NUnit.Framework;
using SolrNet.Attribute
我试图在命令行应用程序中(或者更准确地说,从LINQPad中)使用SolrNet来测试一些查询,并且在尝试初始化库时,我得到了以下错误:
Key 'SolrNet.Impl.SolrConnection.UserQuery+Resource.SolrNet.Impl.SolrConnection' already registered in container
但是,如果我捕捉到这个错误并继续,ServiceLocator会给出以下错误:
Activation error occured while trying to get instance of type ISolrOpe
我正在使用SolrNet与Solr索引交互。我有一个守护进程应用程序通过添加/更新/删除向Solr索引写入数据。然而,对于SolrNet,具有相同唯一键的添加将覆盖(替换)现有文档,而不是附加(组合)它们。
在Lucene中,我可以这样做,其中term是Lucene中表示文档关键字的术语。我如何在SolrNet中做到这一点?我知道在方法中逐字段追加的(痛苦)方式,但肯定有一种更简单的方式...
//where term is a Lucene term for the document key
if (objFacetsSearcher.DocFreq(term) > 0)
{