我是新来solr并试图用它来索引我的数据库“zend”和表“用户”。下面是位于/ solr的/示例/ solr的/ CONF /文件夹使用solr搜索mysql数据库表
<dataConfig>
<dataSource type="JdbcDataSource"
driver="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost/zend"
user="root"
password=""/>
<document>
<entity name="id" query="select id,first_name,last_name from users">
<field column="id" name="solr_id"/>
<field column="first_name" name="solr_first_name"/>
<field column="last_name" name="solr_last_name"/>
</entity>
</document>
</dataConfig>
下面代码我把在位于/ solr的/示例solrconfig.xml中/ solr的/ conf文件夹中的数据-config.xml中的代码我在/ Solr的/例子/ Solr的/ conf文件夹
<field name="solr_id" type="genericID" indexed="true" stored="true"/>
<field name="solr_first_name" type="textgen" indexed="true" stored="true"/>
<field name="solr_last_name" type="textgen" indexed="true" stored="true"/>
的schema.xml中添加
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
</lst>
</requestHandler>
而这些领域做了这些改变后,我跑java -jar start.jar
当我从浏览器中点击全面导入命令一样
http://localhost:8983/solr/dataimport?command=full-import
然后我得到的错误:
HTTP ERROR: 500
Severe errors in solr configuration.
Check your log files for more detailed information on what may be wrong.
If you want solr to continue after configuration errors, change:
<abortOnConfigurationError>false</abortOnConfigurationError>
in null
请指教。
接受的答案,帮助,并开始建立自己的声誉和评价 – 2011-12-21 21:05:49