schema.xml

====================================================

<field name=”id” type=”uuid” indexed=”true” stored=”true” required=”true” />

<fieldType name=”uuid” class=”solr.UUIDField” indexed=”true” />

 

solrconfig.xml

====================================================

#添加uuid

<updateRequestProcessorChain name=”uuid”>

<processor class=”solr.UUIDUpdateProcessorFactory”>

<str name=”fieldName”>id</str>

</processor>

<processor class=”solr.RunUpdateProcessorFactory” />

</updateRequestProcessorChain>

 

#修改/update requestHandler

<requestHandler name=”/update” class=”solr.UpdateRequestHandler”>

<lst name=”defaults”>

<str name=”update.chain”>uuid</str>

</lst>

</requestHandler>