0

I am very new to SOLR and still trying to figure it around. I have some personal crawled data, and I use the my code in this thread to convert it into SOLR's xml field format.

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<add>
<doc>
<field name="ID">1</field>
<field name="FULL_MESSAGE">[CNA] Independent adviser recommends shareholders accept offer for SingLand http://t.co/OEiftRyl7N</field>
<field name="SOURCE">CNA</field>
<field name="NEWS">Independent adviser recommends shareholders accept offer for SingLand </field>
<field name="LINK">http://t.co/OEiftRyl7N</field>
</doc>
<doc>
<field name="ID">2</field>
<field name="FULL_MESSAGE">[ST] Australia's foreign minister updates PM Lee on reverse Colombo Plan http://t.co/bc7ZHCztW5</field>
<field name="SOURCE">ST</field>
<field name="NEWS">Australia's foreign minister updates PM Lee on reverse Colombo Plan </field>
<field name="LINK">http://t.co/bc7ZHCztW5</field>
</doc>
<doc>
<field name="ID">3</field>
<field name="FULL_MESSAGE">[CNA] Grace Fu meets China�s NPC vice chairperson http://t.co/6k9CLe4c1x</field>
<field name="SOURCE">CNA</field>
<field name="NEWS">Grace Fu meets China�s NPC vice chairperson </field>
<field name="LINK">http://t.co/6k9CLe4c1x</field>
</doc>
.
.
.

But when I try to import the xml into SOLR, it kept giving me this error:

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/update

I have absolutely no idea what this means. Is my XML not in the correct format? Or something else? Thanks in advance

Edit: Here are the changes I made to schema.xml. However, it still produce the same error

<fields>
<!-- Custom Fields -->
<field name="ID" type="int" indexed="true" stored="true" required="true" multiValued="false" /> 
<field name="FULL_MESSAGE" type="string" indexed="true" stored="true" />
<field name="SOURCE" type="string" indexed="true" stored="true" />
<field name="NEWS" type="string" indexed="true" stored="true" />
<field name="LINK" type="string" indexed="true" stored="true" />
...
<fields>
Community
  • 1
  • 1
user2741620
  • 305
  • 2
  • 7
  • 21

0 Answers0