solr异常
org.apache.solr.common.SolrException: undefined field text
org.apache.solr.common.SolrException: undefined field text_general
是因为text或者text_general这两个类型未定义
打开solr>自定义的core>solrconfig.xml 可以看到
<str name="df">text_general</str> df为solr中默认的搜索field , 那么此处定义了默认field为text_general,可是我的schema.xml中未定义text_general,那么肯定会报以上错误。
去schema.xml定义这个字段就好了
在schema.xml中定义一个字段
<field name="text" type="text_general" indexed="true" stored="false" multiValued="true"/>