org.apache.solr.common.SolrException:缺少内容流 [英] org.apache.solr.common.SolrException: missing content stream

查看:23
本文介绍了org.apache.solr.common.SolrException:缺少内容流的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经用 Tomcat 安装了 Apache Solr,我的 /solr/admin 工作正常.但是当我尝试发出 /solr/update 时,我收到以下错误.可能是什么原因?

I have installed Apache Solr with Tomcat and my /solr/admin is working fine. But when I try to issue /solr/update I am getting the following error. What could be the reason?

org.apache.solr.common.SolrException: 缺少内容流

org.apache.solr.common.SolrException: missing content stream

推荐答案

/solr/update 将查找任何要编入索引的输入文档.运行普通的 /solr/update 将导致此异常,因为它没有输入.运行它的最简单方法是,

/solr/update will look for any input documents to be indexed. Running plain /solr/update will cause this exception since there is no input for it. The easiest way to run it is like,

java -Durl=localhost:8080/<your apache solr context path, mostly solr>/update -jar post.jar *.xml

如果您尝试保留空的文档集合,这也可能通过 SolrJ/spring-data-solr 发生.

This can also happen through SolrJ/spring-data-solr if you try to persist an empty collection of documents.

所以 solrClient.add(new ArrayList(), 10000);

也会导致错误.

这篇关于org.apache.solr.common.SolrException:缺少内容流的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆