You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Steve Pruitt <bp...@opentext.com> on 2018/08/08 16:16:13 UTC
UUIDField in defined schema
Admin guide has UUIDField as a field type, but it's not defined in the default schema.
The Admin guide describes it in conjunction with the UUIDUpdateProcessorFactory. I see the updateProcessor defined in the default schema.
The only place I see UUIDUpdateProcessorFactory discussed in the Admin guide is in the context of schemaless mode. I don't want to use schemaless mode.
What is an example for using UUIDField not in schemaless mode? Do I have to define a /update request handler? Is there an easier way?
Thanks.
-S
Re: UUIDField in defined schema
Posted by Edward Ribeiro <ed...@gmail.com>.
Go to the solrconfig.xml and replace the schemaless mode opening tag of
<updateRequestProcessorChain> named "add-unknown-fields-to-the-schema" by
this one:
<updateRequestProcessorChain name="choose.me" processor="uuid"
default="true">
It will auto-generate the UUID. If you want to use a UUIDField instead of
string for the uniqueKey (id) then make the changes below in managed-schema:
<fieldType name="uuid" class="solr.UUIDField" indexed="true" />
<field name="id" type="uuid" indexed="true" stored="true" required="true" />
Edward
On Wed, Aug 8, 2018 at 1:16 PM, Steve Pruitt <bp...@opentext.com> wrote:
> Admin guide has UUIDField as a field type, but it's not defined in the
> default schema.
>
> The Admin guide describes it in conjunction with the
> UUIDUpdateProcessorFactory. I see the updateProcessor defined in the
> default schema.
>
> The only place I see UUIDUpdateProcessorFactory discussed in the Admin
> guide is in the context of schemaless mode. I don't want to use schemaless
> mode.
>
> What is an example for using UUIDField not in schemaless mode? Do I have
> to define a /update request handler? Is there an easier way?
>
> Thanks.
>
> -S
>