lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nabil Kouici <koui...@yahoo.fr.INVALID>
Subject Re: Schema API: Modify Unique Key
Date Tue, 28 Mar 2017 09:55:19 GMT
Thank you for your replay.
We would like to have this functionality in order to change unique key to do a partial update.Partial
update cannot work without a unique key and our need is to do like in SQL (update documents
set documents.field1=wyz where documents.field2 = xxx). So we put field2 as unique key (uniqueness
is OK) and do this kind of update.
Regards,Nabil. 

      De : Shawn Heisey <apache@elyograg.org>
 À : solr-user@lucene.apache.org 
 Envoyé le : Lundi 27 mars 2017 17h00
 Objet : Re: Schema API: Modify Unique Key
   
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



   
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message