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

Przemysław Szeremiota edited comment on SOLR-9034 at 5/9/16 10:22 PM:
----------------------------------------------------------------------

Yonik,

I was fighting SOLR 5.5 useDocValuesAsStored/copyField issue on our company's 
SOLR installation, and sufficient fix seems to be simple:
  -        searcher.decorateDocValueFields(sid, docid, 
searcher.getNonStoredDVs(false));
  +       searcher.decorateDocValueFields(sid, docid, 
searcher.getNonStoredDVs(true));
(edit: in 
solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java)

getNonStoredDVs(false) returns all docValues fields, getNonStoredDVs(true) 
returns only docValues fields used as stored, either explicitly or implicitly 
(in schema 1.6). Doesn't masking "implicitly use all docvalues as stored, 
configured or not"  behavior with copyField target detection defeats whole 
purpose of choosing docValues/stored behavior?


was (Author: przemosz):
Yonik,

I was fighting SOLR 5.5 useDocValuesAsStored/copyField issue on our company's 
SOLR installation, and sufficient fix seems to be simple:
-        searcher.decorateDocValueFields(sid, docid, 
searcher.getNonStoredDVs(false));
+        searcher.decorateDocValueFields(sid, docid, 
searcher.getNonStoredDVs(true));
(edit: in 
solr/core/src/java/org/apache/solr/handler/component/RealTimeGetComponent.java)

getNonStoredDVs(false) returns all docValues fields, getNonStoredDVs(true) 
returns only docValues fields used as stored, either explicitly or implicitly 
(in schema 1.6). Doesn't masking "implicitly use all docvalues as stored, 
configured or not"  behavior with copyField target detection defeats whole 
purpose of choosing docValues/stored behavior?

> Atomic updates not work with CopyField
> --------------------------------------
>
>                 Key: SOLR-9034
>                 URL: https://issues.apache.org/jira/browse/SOLR-9034
>             Project: Solr
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 5.5
>            Reporter: Karthik Ramachandran
>            Assignee: Yonik Seeley
>              Labels: atomicupdate
>             Fix For: 6.1
>
>         Attachments: SOLR-9034.patch, SOLR-9034.patch, SOLR-9034.patch
>
>
> Atomic updates does not work when CopyField has docValues enabled.  Below is 
> the sample schema
> {code:xml|title:schema.xml}
>    <field name="single_i_dvn" multiValued="false" type="int"    
> indexed="true" stored="true" />
>    <field name="single_d_dvn" multiValued="false" type="double" 
> indexed="true" stored="true" />
>    <field name="single_s_dvn" multiValued="false" type="string" 
> indexed="true" stored="true" />
>    <field name="copy_single_i_dvn" multiValued="false" type="int"    
> docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
>    <field name="copy_single_d_dvn" multiValued="false" type="double" 
> docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
>    <field name="copy_single_s_dvn" multiValued="false" type="string" 
> docValues="true" indexed="true" stored="false" useDocValuesAsStored="false" />
> {code}
> Below is the exception
> {noformat}
> Caused by: java.lang.IllegalArgumentException: DocValuesField
>  "copy_single_i_dvn" appears more than once in this document 
> (only one value is allowed per field)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to