lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alfonso Muñoz-Pomer Fuentes <>
Subject Re: using uuid for documents
Date Sun, 16 Sep 2018 13:51:20 GMT
Hi Zahra,

We had a similar issue in our collections and we solved this by generating a UUID value using
the content of other fields, in reply to your first question. Have a look at the section,
specifically at how SignatureUpdateProcessorFactory is used.

In our case, we create a UUID in field “id” (signatureField) from the fields bioentity_identifier,
property_name and property_value (fields).
  <updateRequestProcessorChain name="dedupe" default="true">
    <processor class="solr.processor.SignatureUpdateProcessorFactory">
      <bool name="enabled">true</bool>
      <str name="signatureField">id</str>
      <bool name="overwriteDupes">false</bool>
      <str name="fields">bioentity_identifier,property_name,property_value</str>
      <str name="signatureClass">solr.processor.Lookup3Signature</str>
    <!-- Uncomment to disable explicit commit and optimize calls -->
    <!--<processor class="solr.IgnoreCommitOptimizeUpdateProcessorFactory">-->
      <!--<int name="statusCode">200</int>-->
    <processor class="solr.LogUpdateProcessorFactory" />
    <processor class="solr.DistributedUpdateProcessorFactory"/>
    <processor class="solr.RunUpdateProcessorFactory" />

As for your second question, how is that different to automatic UUID generation?



> On 16 Sep 2018, at 11:20, Zahra Aminolroaya <> wrote:
> I have two questions about using uuid:
> In Solr refs, it is stated that the unique id could be of uuid type. I
> found we can generate uuid when the doc id with uuid field type is null or
> we it is generated by using
> doc.addField("id", UUID.randomUUID().toString()) in solrj.
> 1- Suppose my unique id type is string. Can I generate a uuid value from my
> unique id string and insert it as a distinct uuid field in Solr?
> 1- Suppose my unique id type is uuid. If I try to insert a random string
> which is not in uuid format, I get the "invalid uuid" error. Is there anyway
> to generate a correct uuid value in solr GUI similar to what solrj 
> UUID.randomUUID().toString() generates?
> Best,
> Zahra
> --
> Sent from:

Alfonso Muñoz-Pomer Fuentes
Senior Lead Software Engineer @ Gene Expression Team
European Bioinformatics Institute (EMBL-EBI)
European Molecular Biology Laboratory
Tel:+ 44 (0) 1223 49 2633
Skype: amunozpomer

View raw message