--- On Wed, 9/12/12, Dotan Cohen <dotanco...@gmail.com> wrote:

> From: Dotan Cohen <dotanco...@gmail.com>
> Subject: Solr unique key can't be blank
> To: solr-user@lucene.apache.org
> Date: Wednesday, September 12, 2012, 5:06 PM
> Consider this simple schema:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <schema name="uuidTest" version="0.1">
>     <types>
>         <fieldType
> name="uuid" class="solr.UUIDField" indexed="true" />
>     </types>
>     <fields>
>         <field name="id"
> type="uuid" indexed="true" stored="true"
> required="true"/>
>     </fields>
> </schema>
> 
> When trying to upload it to Websolr I am getting this
> error:
> Solr unique key can't be blank
> 
> I also tried adding this element to the XML, after
> </fields>:
> <uniqueKey>id</uniqueKey>
> 
> However this did not help. What could be the issue? I The
> code is
> taken verbatim from this page:
> http://wiki.apache.org/solr/UniqueKey
> 
> Note that this is on a Solr 4 Alpha index. Thanks.

Hi Dotan,

Did you define the following update processor chain in solrconfig.xml ?
And did you reference it in an update handler?
 
<updateRequestProcessorChain name="uuid">
    <processor class="solr.UUIDUpdateProcessorFactory">
      <str name="fieldName">id</str>
    </processor>
    <processor class="solr.RunUpdateProcessorFactory" />
</updateRequestProcessorChain>

Reply via email to