lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Hostetter <hossman_luc...@fucit.org>
Subject Re: Throwing Error "Missing Mandatory uniquekey field id"
Date Tue, 01 Jul 2014 17:32:54 GMT

: I mentioned id as string in schema.xml and i copied the csv into example docs
: folder. I used the below commaand to download the data " Java
: -Dtype=application/csv -jar post.jar import.csv" 
: 
: it's throwing the below error.Please help in this regard.
: 
: ERROR - 2014-07-01 19:57:43.902; org.apache.solr.common.SolrException;
: org.apache.solr.common.SolrException: Document is missing mandatory
: uniqueKey field: id

The error message is as clear as it can be: you are attempting ot add a 
document that doesn't have an "id" field.

what does you "import.csv" file look like?  does it have  header row 
listing the column names?  is one of those column names "id" ? ... if not, 
then solr can't figure out what documents you are trying to send it using 
a "fieldnames" param...


https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers#UploadingDatawithIndexHandlers-CSVFormattedIndexUpdates


-Hoss
http://www.lucidworks.com/

Mime
View raw message