solr问题missing content stream

在使用solrj建立索引的时候,报错:missing content stream;

原因在于

HttpSolrServer httpSolrServer = new HttpSolrServer(sorlurl);
try {
  httpSolrServer.add(docList);
  httpSolrServer.commit();
} catch (SolrServerException | IOException e) {
  // TODO Auto-generated catch block
  e.printStackTrace();
}

程序执行时,docList为空,没有文档能够被用于建立索引

文章来自:http://www.cnblogs.com/strive-for-freedom/p/4229303.html
© 2021 jiaocheng.bubufx.com  联系我们
ICP备案:鲁ICP备09046678号-3