org.apache.solr.common.SolrException undefined field text

来源:互联网 发布:数字网络用语有哪些 编辑:程序博客网 时间:2024/05/18 00:49
在collection1文件夹的solrconfig.xml文件中
<str name="df">text</str>    
df为solr中默认的搜索field   , 那么此处定义了默认field为text,可是我的schema.xml中未定义text,那么肯定会报以上错误。
解决方法:
1.在schema.xml中定义一个字段
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>
2.在solrconfig.xml中的所有df中更改为schema.xml中存在的字段,如 id
阅读全文
0 0