2013-05-31 31 views
2

我在使用Apache Solr远程流式传输时遇到问题。使用Solr远程流式传输

我们以前曾经在要被索引的文件所在的同一台服务器上运行Solr,所以我们只需将它传递给我们想要索引的文件的路径。

我们使用这样的事情:

stream.file=/path/to/file.pdf 

这工作得很好。我们现在已经移动了Solr,以便它可以在不同的服务器上运行到使用它的网站。这是因为它使用了太多的资源。

我现在使用下面的文件的方向指向的Solr:

stream.file=http://www.remotesite.com/path/to/file.pdf 

当我这样做的Solr报告以下错误:

http:/www.remotesite.com/path/to/file.pdf (No such file or directory) 

请注意,这是剥离其中一个来自http://的斜杠。

我怎样才能让Solr索引一个文件在某个URL像我想要做的上面? enableRemoteStreaming参数已被设置为true。

谢谢

回答

2

对于remote streaming

,你将需要启用远程流

<requestParsers enableRemoteStreaming="true" multipartUploadLimitInKB="2048" /> 

,并可能使用stream.url对于网址

If remote streaming is enabled and URL content is called for during request handling, the contents of each stream.url and stream.file parameters are fetched and passed as a stream.

+0

使用stream.url,而不是流。文件整理出来了,谢谢! – jd182

+0

@Jayendra请给出一个完整的例子吗?我试图使用这个解决方案,并得到错误 - “缺少uniqueKey”。 – ajay