我在使用 Apache 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。
谢谢
最佳答案
您需要启用远程流式传输
<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.
关于apache - 使用 Solr 进行远程流式传输,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16857923/