On 3/27/2017 7:05 AM, nabil Kouici wrote: > We're going to use Solr in our organization (under test) and we want > to set the primary key through schema API, which is not allowed today. > Is this function planned to be implemented in Solr? If yes, do you > have any idea in which version?
Steve Rowe has been working on it, as he mentioned. I have asked him a question via the SOLR-7242 issue. I can think of two reasons that this functionality has NOT been written yet: 1) In Cloud mode on a distributed index, it is unlikely that the existing collection will have the documents in the correct shards. Entirely reindexing is strongly recommended in these situations. 2) Before changing the uniqueKey, you must be absolutely certain that the field is the appropriate type and that the field does not contain the same value more than once. If this is not the case, Solr will not behave correctly. Thanks, Shawn