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
https://lucene.apache.org/solr/guide/7_4/update-request-processors.html#custom-update-request-processor-chain,
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).
true
id
false
bioentity_identifier,property_name,property_value
solr.processor.Lookup3Signature
As for your second question, how is that different to automatic UUID generation?
HTH,
Alfonso
> 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: http://lucene.472066.n3.nabble.com/Solr-User-f472068.html
--
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