【发布时间】:2013-12-02 16:58:17
【问题描述】:
嘿嘿,
我正在使用 solr 来索引一些 xml 文件。 我的 xml 文件如下所示:
<add>
<doc>
<field name="id">736</field>
<field name="title">President of China lunches with Brazilian President</field>
<field name="date">November 13, 2004</field>
<field name="content"> Data comes here </field>
<field name="location">Brazil</field>
<field name="coords">43.17614,-90.57341</field>
</doc>
</add>
我的 schema.xml 有以下字段:
<field name="id" type="string" indexed="true" stored="true" required="true" multiValued="false" />
<field name="title" type="text_general" indexed="true" stored="true" multiValued="true"/>
<field name="date" type="date" indexed="true" stored="true"/>
<field name="location" type="text_general" indexed="true" stored="true"/>
<field name="coords" type="location" indexed="true" stored="true"/>
<field name="content" type="text_general" indexed="false" stored="true" multiValued="true"/>
当我使用 POST 索引文件时,我收到以下错误:
C:\Apache\solr-4.5.1\example\solr\collection1\data>java -jar post.jar 1.xml
SimplePostTool version 1.5
Posting files to base url http://localhost:8983/solr/update using content-type a
pplication/xml..
POSTing file 1.xml
SimplePostTool: WARNING: Solr returned an error #400 Bad Request
SimplePostTool: WARNING: IOException while reading response: java.io.IOException
: Server returned HTTP response code: 400 for URL: http://localhost:8983/solr/up
date
1 files indexed.
COMMITting Solr index changes to http://localhost:8983/solr/update..
Time spent: 0:00:00.034
我做错了什么?
【问题讨论】:
标签: xml solr indexing schema ioexception