lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hoss Man (Commented) (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-2796) AddUpdateCommand.getIndexedId doesn't work with schema configured defaults - UUIDField can not be used as uniqueKey field
Date Tue, 27 Sep 2011 00:03:12 GMT

    [ https://issues.apache.org/jira/browse/SOLR-2796?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13115053#comment-13115053
] 

Hoss Man commented on SOLR-2796:
--------------------------------

Example config...

{code}
<fieldType name="uuid" class="solr.UUIDField" indexed="true" />
...
<field name="uuid" type="uuid" indexed="true" stored="true" required="true" default="NEW"
/> 
...
<uniqueKey>uuid</uniqueKey>
{code}

Resulting error when posting example docs...

{noformat}
SEVERE: org.apache.solr.common.SolrException: Document is missing mandatory uniqueKey field:
uuid
	at org.apache.solr.update.AddUpdateCommand.getIndexedId(AddUpdateCommand.java:80)
	at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:151)
	at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:60)
	at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:115)
	at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:133)
	at org.apache.solr.handler.XMLLoader.load(XMLLoader.java:78)
	at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:58)
	at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
	at org.apache.solr.core.SolrCore.execute(SolrCore.java:1451)

{noformat}

                
> AddUpdateCommand.getIndexedId doesn't work with schema configured defaults - UUIDField
can not be used as uniqueKey field
> -------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-2796
>                 URL: https://issues.apache.org/jira/browse/SOLR-2796
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>    Affects Versions: 4.0
>            Reporter: Hoss Man
>             Fix For: 4.0
>
>
> in Solr 1.4, and the HEAD of the 3x branch, the UUIDField can be used as the uniqueKey
field even if documents do not specify a value by taking advantage of the {{default="NEW"}}
feature of UUIDField.  but something has changed in trunk to break this behavior.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message