如果在schema.xml 定义中不存在text field ,在启动solr 时会出现下面的异常:
org.apache.solr.common.SolrException: undefined field text
原因:未知,有可能是solr 的一个bug。
解决办法:只要在schema.xml 文件中增加一个text field ,这样在启动时就没有异常了。
如下:
<field name="text" type="text" stored="false" indexed="false"/>