1.solr error logs org.apache.solr.common.SolrException: ERROR: [doc=17] unknown field aliashtml
在solr中 添加新的索引词语时,报如标题所示错误,指定是插入的字段没有在solr索引字段里java
能够修改 solr安装目录/solr/conf 目录下的 schema.xml apache
在此xml文件内加入所需字段便可,格式以下 tomcat
<field name="alias" type="text_general" indexed="true" stored="true" />
注: name, type, indexed, stored 可根据实际状况进行填写! type 必须填写schema.xml中fieldtype 定义的类型code
2. java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpxml
若是遇到找不到"solrconfig.xml"文件的错误,设置solr.solr.home环境变量:在D:\apache-tomcat-6.0.35\bin\catalina.bat文件(非windons,修改catalina.sh文件)第一行加入 set JAVA_OPTS=%JAVA_OPTS% -Dsolr.solr.home=D:\apache-tomcat-6.0.35\solrhtm
3.rg.apache.solr.common.SolrException: Error loading class 'solr.VelocityResponseWriterblog
<queryResponseWriter name="velocity" class="solr.VelocityResponseWriter" enable="${solr.velocity.enabled:true}"/>
<!-- 把 enable="${solr.velocity.enabled:true}中的true修改成false -->索引