开发者

SOLR Index a remote file

Does anyone know how to index a remote file using SOLR? I've tried the following

curl http://localhost:8983/solr/update/extrac开发者_如何学运维t?literal.id=rem1&uprefix=attr_&fmap.content=body&commit=true" -F stream.url=http://fakesite.com

with no luck.

The local host equivalent

curl http://localhost:8983/solr/update/extract?literal.id=rem1&uprefix=attr_&fmap.content=body&commit=true" -F "stream.url=http://duke.edu/web/aepi/"

works fine.

Thanks! djs22


For security reasons, remote streaming is disabled by default. From the Solr wiki:

If streaming is enabled, you need to make sure Solr is as secure as it needs to be. When streaming is enabled, the parameters "stream.url" will go to a remote site and download the content. Likewise, "stream.file" will read a file on disk.

Streaming is disabled by default and is configured from solrconfig.xml

 <requestParsers enableRemoteStreaming="false" ... />
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜