i have three docs to be indexed into solr . sample of the 3 docs has been given below.
Doc 1:{ name:"alex" age:"25"}
Doc 2:{ name:"alex" age:"29"}
Doc 3:{ name:"benu" age:"29"}
Suggest me a way to index this.
i have three docs to be indexed into solr . sample of the 3 docs has been given below.
Doc 1:{ name:"alex" age:"25"}
Doc 2:{ name:"alex" age:"29"}
Doc 3:{ name:"benu" age:"29"}
Suggest me a way to index this.
2
Answers
In order to index the above 3 documents , i just removed the unique key( mentioned below) in the managed schema and it works perfectly.
In case if removing this throws a QueryElevate exception, remove the searchComponent named elevator in the solrconfig.
So if name is not unique, why is it the uniqueKey?
You have the option to give
overwrite=false
in the update request if you want to override the uniqueKey requirement for certain updates, but be aware that this will require that parameter to be present for any request that updates documents.It’s usually far better to assign a uniqueKey to each row (such as a uuid), or use an existing one (like the id of the row in the database).