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

Munendra S N commented on SOLR-12546:
-------------------------------------

[~mkhludnev]
Thank you for the feedback
 [^SOLR-12546-old.patch] 
I have attached an older patch which doesn't handle 3rd case(Hence, no new 
public API in ReturnFields). Currently, all other response writers(JSON and XML 
at least) return non-stored docvalue true field if specified explicitly with 
fl=*(i.e, fl=*,non_stored_doc_field). Without the new public API in 
ReturnFields I couldn't find a better way to handle this in CSV response 
writer. Also, to handle SOLR-7414 I was thinking of using this. Other than 
these cases I can't think of any other cases where this Public API would be 
required. I will leave the final  call of whether this should be included or 
not to you(As my opinion would be biased here)

> CSVResponseWriter doesnt return non-stored field even when docValues is 
> enabled, when no explicit fl specified
> --------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-12546
>                 URL: https://issues.apache.org/jira/browse/SOLR-12546
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>          Components: Response Writers
>    Affects Versions: 7.2.1
>            Reporter: Karthik S
>            Priority: Major
>             Fix For: 7.2.2
>
>         Attachments: SOLR-12546-old.patch, SOLR-12546.patch, SOLR-12546.patch
>
>
> As part of this Jira SOLR-2970,  CSVResponseWriter doesn't return fields 
> whose stored attribute set to false, but doesnt consider docvalues.
>  
> Causing fields whose stored=false and docValues =true are not returned when 
> no explicit fl are specified. Behavior must be same as of json/xml response 
> writer..
>  
> Eg:
> -      Created collection with below fields
> <field docValues="true" indexed="true" name="contentid" required="true" 
> type="string"/>         
> <field docValues="true" indexed="false" multiValued="false" name="testint" 
> type="int" stored="false"/>
> <field docValues="true" indexed="false" multiValued="false" name="testlong" 
> type="plong" stored="false"/>
>             
> <fieldType class="solr.TrieIntField" name="int" positionIncrementGap="0" 
> precisionStep="0"/>
> <fieldType name="plong" class="solr.LongPointField" docValues="true"/>
>  
>  
> -      Added few documents
> contentid,testint,testlong
> id,1,56
> id2,2,66
>  
> -      http://machine:port/solr/testdocvalue/select?q=*:*&wt=json
>         [\{"contentid":"id",        "_version_":1605281886069850112,        
> "timestamp":"2018-07-06T22:28:25.335Z",        "testint":1,        
> "testlong":56},
>       {
>         "contentid":"id2",        "_version_":1605281886075092992,        
> "timestamp":"2018-07-06T22:28:25.335Z",        "testint":2,        
> "testlong":66}]
>  
> -      http://machine:port/solr/testdocvalue/select?q=*:*&wt=csv
> "_version_",contentid,timestamp1605281886069850112,id,2018-07-06T22:28:25.335Z1605281886075092992,id2,2018-07-06T22:28:25.335Z
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to