I am trying to load the CSV file in the solr 6.5 collection, using the solr Admin UI. Here are the steps that I did and got the following error:
- Created a data driven managed schema config set in Zookeeper. Changed the unique key to "MyId" (String field) instead of default id.
<uniqueKey>MyId</uniqueKey>
...
<field name="MyId" type="string" indexed="true" stored="true" required="true" multiValued="false" />
Created collection and associated the config set mentioned above (using new Admin UI).
Load the CSV file using Admin UI (collections --> collection name drop down --> Documents). I have added request handler parameter of
&rowid=MyId
parameters. My CSV file hasMyId
field in it. During the load I get this error:Document contains multiple values for uniqueKey field: MyId=[82552329, 1] at org.apache.solr.update.AddUpdateCommand.getHashableId(AddUpdateCommand.java:168)
Without changing the unique ID and just using the default
id
(with auto generated UUID) field the csv loading fine. But I need the unique id to beMyId
I would like to know why my key field is reported as multi-valued, my CSV does not really contain multi-valued data, it is simple comma separated numeric and string fields. Please suggest what could have gone wrong.
Note: I have made this change as well Solr Schemaless Mode creating fields as MultiValued in the schema (does not help, as the problem is input data)
EDIT: Adding full exception trace