【高端】200分等高人指点迷津solor报错 solr 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 调了半天,查了半天,妹的,我终于明白,错是有道理的。junit测试方法如下: @Test public void test01() { // 创建solrServer对象 try { CommonsHttpSolrServer server = new CommonsHttpSolrServer(URL); SolrInputDocument doc = new SolrInputDocument(); doc.addField("id", "1"); doc.addField("msg_title", "这是一个标题"); doc.addField("content", "请注意,这个字段在schema.xml中没有配置,因此下面会报错"); server.add(doc); server.commit(); } catch (Exception e) { e.printStackTrace(); } }而schema.xml配置文件的配置如下:<field name="msg_title" type="textComplex" indexed="true" stored="true" required="true" />少了对content对应的配置。所以调试的时候会报错:org.apache.solr.common.SolrException: Bad RequestBad Requestrequest: http://localhost:8080/solr/update?wt=javabin&version=2加上content对应的配置,ko,终于搞定了。。 在线编辑器fckeditor的文件上传怎么弄? 急求一个spring框架下的Quartz计划任务问题 c:choose when test=${} 在java控制台如何输出双引号? 各位朋友帮我解释一下我 这个代码的意思。 谁有webshere Application server jbuilderX下做的struts工程如何让它在tomcat中运行? 在weblogic配置jdbc的问题 怎么进tom cat 的Tomcat Administration/Tomcat Manager? JBUILDER的一些问题 调用webservice报错 ,求帮忙看下 ibaits调用存储过程错误
junit测试方法如下:
@Test
public void test01() {
// 创建solrServer对象
try {
CommonsHttpSolrServer server = new CommonsHttpSolrServer(URL);
SolrInputDocument doc = new SolrInputDocument();
doc.addField("id", "1");
doc.addField("msg_title", "这是一个标题");
doc.addField("content", "请注意,这个字段在schema.xml中没有配置,因此下面会报错");
server.add(doc);
server.commit();
} catch (Exception e) {
e.printStackTrace();
}
}而schema.xml配置文件的配置如下:
<field name="msg_title" type="textComplex" indexed="true" stored="true" required="true" />
少了对content对应的配置。所以调试的时候会报错:
org.apache.solr.common.SolrException: Bad RequestBad Requestrequest: http://localhost:8080/solr/update?wt=javabin&version=2
加上content对应的配置,ko,终于搞定了。。