Skip to content

Instantly share code, notes, and snippets.

@chringel21
Forked from oniram/conf.xml
Created December 16, 2019 09:13
Show Gist options
  • Save chringel21/76fe225ba5cb89447f9814ded8c672c3 to your computer and use it in GitHub Desktop.
Save chringel21/76fe225ba5cb89447f9814ded8c672c3 to your computer and use it in GitHub Desktop.
How configure uuid solr with Dataimporthandler
<!-- solrconfig.xml -->
<requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImportHandler">
<lst name="defaults">
<str name="config">data-config.xml</str>
<str name="update.chain">uuid</str> <!-- ADD THIS LINE-->
</lst>
</requestHandler>
<updateRequestProcessorChain name="uuid">
<processor class="solr.UUIDUpdateProcessorFactory">
<str name="fieldName">uuid</str>
</processor>
<processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>`
<!-- schema.xml -->
<field name="uuid" type="uuid" indexed="true" stored="true" required="true" />
<uniqueKey>uuid</uniqueKey>
<fieldType name="uuid" class="solr.UUIDField" indexed="true" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment