2013-06-27 59 views
1

謝謝,我編輯我的數據-config.xml文件HTTP錯誤500 prbm存取/ Solr的/ dataimport無法配置Solr的

是這樣的

<dataConfig> 
<dataSource type="JdbcDataSource" 
driver="com.mysql.jdbc.Driver" 
url="jdbc:mysql://localhost/lol" 
user="root" 
password="n"/> 

<document name="content"> 
<entity name="id"> 
query="SELECT id from foo" 
</entity> 
</document> 
</dataConfig> 

當我運行

http://localhost:8983/solr/dataimport?command=full-import 

在瀏覽器中得到這個

<response><lst name="responseHeader"><int name="status">0</int><int name="QTime">1</int></lst><lst name="initArgs"><lst name="defaults"><str name="config">data-config.xml</str></lst></lst><str name="status">idle</str><str name="importResponse"/><lst name="statusMessages"><str name="Time Elapsed">0:0:6.299</str><str name="Total Requests made to DataSource">1</str><str name="Total Rows Fetched">0</str><str name="Total Documents Processed">0</str><str name="Total Documents Skipped">0</str><str name="Full Dump Started">2013-06-28 11:17:34</str><str name="">Indexing failed. Rolled back all changes.</str><str name="Rolledback">2013-06-28 11:17:34</str></lst><str name="WARNING">This response format is experimental. It is likely to change in the future.</str></response>

+0

你已經採取了看看'數據-config.xml中; lineNumber:11; columnNumber:2;'? – femtoRgon

+0

@femtoRgon我編輯了我的問題,plz幫助 –

回答

0

我相信,配置應該看起來更像(注意,查詢應該是entity元素的屬性):

<document name="content"> 
    <entity name="id" query="SELECT id from foo"> 
     <!--I assume you have a field in Solr and a column in MySQL, both of which are named "id"--> 
    </entity> 
    </document>