Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-12546

CSVResponseWriter doesnt return non-stored field even when docValues is enabled, when no explicit fl specified

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.2.1
    • 7.7, 8.0
    • Response Writers
    • None

    Description

      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
       
       

      Attachments

        1. SOLR-12546.patch
          7 kB
          Mikhail Khludnev
        2. SOLR-12546.patch
          11 kB
          Mikhail Khludnev
        3. SOLR-12546.patch
          11 kB
          Munendra S N
        4. SOLR-12546-old.patch
          7 kB
          Munendra S N

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mkhl Mikhail Khludnev Assign to me
            ksundaram Karthik S
            Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment