我是新來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