lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dana Cohen (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-3814) Partial document update silently breaks multi-valued constraint
Date Wed, 17 Oct 2012 18:16:07 GMT

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

Dana Cohen commented on SOLR-3814:
----------------------------------

this is still an issue for me.  i can reproduce the same error without using real-time get
or solr cloud.
this may need to be reopened?
                
> Partial document update silently breaks multi-valued constraint
> ---------------------------------------------------------------
>
>                 Key: SOLR-3814
>                 URL: https://issues.apache.org/jira/browse/SOLR-3814
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>    Affects Versions: 4.0-BETA
>         Environment: windows xp, java 6 or 7
>            Reporter: Yoni Amir
>
> 1) Download the tutorial, start solr, and post to it the file solr.xml as explained in
the tutorial.
> 2) query *:* and verify that you have one document in solr with id SOLR1000
> 3) copy the xml file and create a partial update command for that document. I used something
like this:
> <add>
> <doc>
>   <field name="id">SOLR1000</field>
>   <field name="manu" update="set">new value</field>
> </doc>
> </add>
> 4) Post this document to solr. It will succeed.
> 5) Query *:* again, and you will notice something strange. There is still one document,
but in the results the field price_c appears twice, even though it is not a multi-valued field.
> <result name="response" numFound="1" start="0">
>   <doc>
>     <str name="id">SOLR1000</str>
>     ...
>     <float name="price">0.0</float>
>     <arr name="price_c">
>       <str>0.0,USD</str>
>       <str>0,USD</str>
>     </arr>
>   </doc>
> </result>
> 6) change the value in the xml that you just sent (e.g. "new value2") and post it again
to solr. Now solr throws an exception:
> SEVERE: org.apache.solr.common.SolrException: ERROR: [doc=SOLR1000] multiple values encountered
for non multiValued field price_c
> : [0.0,USD, 0,USD]
>         at org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:242)
>         at org.apache.solr.update.AddUpdateCommand.getLuceneDocument(AddUpdateCommand.java:76)
>         at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:208)
>         at org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:61)
>         at org.apache.solr.update.processor.UpdateRequestProcessor.processAdd(UpdateRequestProcessor.java:51)
>         at org.apache.solr.update.processor.DistributedUpdateProcessor.doLocalAdd(DistributedUpdateProcessor.java:414)
>         at org.apache.solr.update.processor.DistributedUpdateProcessor.versionAdd(DistributedUpdateProcessor.java:535)
>         at org.apache.solr.update.processor.DistributedUpdateProcessor.processAdd(DistributedUpdateProcessor.java:315)
>         at org.apache.solr.update.processor.LogUpdateProcessor.processAdd(LogUpdateProcessorFactory.java:100)
>         at org.apache.solr.handler.loader.XMLLoader.processUpdate(XMLLoader.java:230)
>         at org.apache.solr.handler.loader.XMLLoader.load(XMLLoader.java:157)
>         at org.apache.solr.handler.UpdateRequestHandler$1.load(UpdateRequestHandler.java:92)
>         at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74)
>         at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:129)
>         at org.apache.solr.core.SolrCore.execute(SolrCore.java:1656)
>         at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:454)
>         at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:275)
>         at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1337)
> I am trying to use the partial update feature in my current project, and this is a showstopper
for us right now.
> Thanks,
> Yoni

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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