I want to use UUIDUpdateProcessorFactory to automatically generate UUID as the uniqueKey field for all new documents that will be created. I followed the given instructions & also tried already given solutions here & here but nothing worked. I am using solr version 9.1.1 on Ubuntu 22.04.1 LTS.
I amgetting the error: missing required field: id.
Following is my current configuration which is generating error:
solr-spec: 9.1.1
lucene-spec: 9.3.0
managed-schema.xml
-----------------------
<fieldType name="uuid" class="solr.UUIDField" indexed="true"/>
<field name="id" type="uuid" indexed="true" stored="true" required="true" multiValued="false" />
<field name="_root_" type="uuid" indexed="true" stored="false" docValues="false" />
<uniqueKey>id</uniqueKey>
solrconfig.xml
---------------
<updateRequestProcessorChain name="uuid">
<processor class="solr.UUIDUpdateProcessorFactory">
<str name="fieldName">id</str>
</processor>
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>
<requestHandler name="/update" class="solr.UpdateRequestHandler">
<lst name="defaults">
<str name="update.chain">uuid</str>
</lst>
</requestHandler>
Error Message:
RequestHandlerBase org.apache.solr.common.SolrException: [doc=null] missing required field: id
Please advise what I am missing?