Here is an exausting and exhaustive discursion about picking a unique key: http://wiki.apache.org/solr/UniqueKey
On Tue, Nov 9, 2010 at 4:20 PM, Dennis Gearon <gear...@sbcglobal.net> wrote: > Seems to me, it would be a good idea to put into the Solr Code, a unique ID > per > instance or installation or both, accessible either with JAVA or a query. Kind > of like all the browsers do for their SSL connections. > > Then, it's automatically easy to implement what is described below. > > Maybe it should be written to the config file upon first run when it does not > exist, and then any updates or reinstalls would reuse the same > installation/instance ID. > > > > From: Christopher Gross <cogr...@gmail.com> > To: solr-user@lucene.apache.org > Sent: Tue, November 9, 2010 11:37:03 AM > Subject: Re: dynamically create unique key > > Thanks Hoss, I'll look into that! > > -- Chris > > > On Tue, Nov 9, 2010 at 1:43 PM, Chris Hostetter > <hossman_luc...@fucit.org>wrote: > >> >> : one large index. I need to create a unique key for the Solr index that >> will >> : be unique per document. If I have 3 systems, and they all have a >> document >> : with id=1, then I need to create a "uniqueId" field in my schema that >> : contains both the system name and that id, along the lines of: "sysa1", >> : "sysb1", and "sysc1". That way, each document will have a unique id. >> >> take a look at the SignatureUpdateProcessorFactory... >> >> http://wiki.apache.org/solr/Deduplication >> >> : <copyField source="source" dest="uniqueId"/> >> : <copyField source="id" dest="uniqueId"/> >> ... >> : So instead of just appending to the uniqueId field, it tried to do a >> : multiValued. Does anyone have an idea on how I can make this work? >> >> copyField doesn't "append" it copies Field (value) instances from the >> "source" field to the "dest" field -- so if you get multiple values for >> hte dest field. >> >> >> -Hoss >> > > -- Lance Norskog goks...@gmail.com