I’m trying to upload csv file to index. When I do I’m getting an error:
org.apache.solr.common.SolrException: undefined field ----------------------------4566bce013ce
at org.apach.solr.schema.IndexSchema.getField(IndexSchema.java:1185)
I’m uploading the csv file via curl as follows:
curl http://localhost:8080/solrTest/update/csv -F commit=ture -F skipLine=1 -F stream.file=/home/solr/text.csv -F fieldnames=partId,desc,usage -H content-type:text/plain;charset=utf-8
All of my fields are defined in my schema.xml, so I’m not sure why I’m getting an undefined field error.
let me know if you need any more information, Thanks.
EDIT:
Ok, after reading the post by Itay Moav, I’ve decided to do some more simple test. I’m using a csv file with only one record with a partId (test123). My schema.xml look like this:
<?xml version="1.0" encoding="UTF-8" ?>
<schema name="parts" version="1.5">
<types>
<fieldType name="text_en_us" class="solr.StrField">
</types>
<fields>
<field name=partId type="text_en_us" indexed="true" stored="true" required="true" />
<uniqueKey>partId</uniqueKey>
</fields>
</schema>
I’m getting the same error even with this test data. the only thing that changes is the number at the end.
org.apache.solr.common.SolrException: undefined field ----------------------------------7951b21305c3
thanks again for any help.
do a binary elimination of the records in the csv file, untill u r left only with the problematic record. Then u either see the problem by yourself, or post here the record and the schema