You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Bill Bell (JIRA)" <ji...@apache.org> on 2013/03/21 04:51:15 UTC
[jira] [Commented] (SOLR-3676) Documents with a lowercased
uniqueKey are sometimes not overwritten on an update
[ https://issues.apache.org/jira/browse/SOLR-3676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13608592#comment-13608592 ]
Bill Bell commented on SOLR-3676:
---------------------------------
I just got bitten by this same bug.
I was using a uniqueKey of text with Lowercase, and it allows duplicates. If I lowercase it first, and put into another field that is a string it works fine and actually deletes the field when the same field comes in the 2nd time.
What is the chances this is going to be fixes?
> Documents with a lowercased uniqueKey are sometimes not overwritten on an update
> --------------------------------------------------------------------------------
>
> Key: SOLR-3676
> URL: https://issues.apache.org/jira/browse/SOLR-3676
> Project: Solr
> Issue Type: Bug
> Components: update
> Affects Versions: 4.0-ALPHA
> Reporter: Scott Smerchek
>
> Given a schema of:
> {code}
> <field name="_version_" type="long" indexed="true" stored="true"/>
> <field name="id" type="lowercase" indexed="true" stored="true" required="true" />
> <dynamicField name="*" type="lowercase" indexed="true" multiValued="true" stored="true" />
> {code}
> and using the {{solr.UpdateRequestHandler}} and {{updateLog}}
> {code}
> <updateHandler class="solr.DirectUpdateHandler2">
> <updateLog>
> <str name="dir">{solr.core.home}/data</str>
> </updateLog>
> </updateHandler>
> {code}
> Adding the document:
> {code}
> {
> "id": "TEST",
> "someField": "SomeValue"
> }
> {code}
> and then adding the same document again with a new value
> {code}
> {
> "id": "TEST",
> "someField": "Some New Value"
> }
> {code}
> returns BOTH documents. It does not overwrite the original.
> {code}
> <result name="response" numFound="2" start="0">
> <doc>
> <str name="id">TEST</str>
> <arr name="someField">
> <str>Some Value</str>
> </arr>
> <long name="_version_">1408495649332133888</long>
> </doc>
> <doc>
> <str name="id">TEST</str>
> <arr name="someField">
> <str>Some NEW Value</str>
> </arr>
> <long name="_version_">1408495678543364096</long>
> </doc>
> </result>
> {code}
> However, adding a document with a lowercase version of the id:
> {code}
> {
> "id": "test",
> "someField": "Some NEWER Value"
> }
> {code}
> overwrites BOTH documents.
> {code}
> <result name="response" numFound="1" start="0">
> <doc>
> <str name="id">test</str>
> <arr name="someField">
> <str>Some NEWER Value</str>
> </arr>
> <long name="_version_">1408495853401800704</long>
> </doc>
> </result>
> {code}
--
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