开发者

SOLR Index a remote file

开发者 https://www.devze.com 2023-02-16 16:07 出处:网络
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=bo

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

精彩评论

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