Solr
  1. Solr
  2. SOLR-2291

JSONWriter.writeSolrDocument() does not respect its Set<String> returnFields parameter.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.6
    • Component/s: Response Writers
    • Labels:
      None

      Description

      When SolrDocumentList used instead of DocList in the response, (unlike XMLWriter), JSONWriter prints all existing fields of a SolrDocument.

      1. SOLR-2291.patch
        2 kB
        Ahmet Arslan

        Activity

        Hide
        Ahmet Arslan added a comment -

        This bug does not exist in trunk. Via the following check :

        if (!returnFields.wantsField(fname)) {
          continue;
        }
        
        Show
        Ahmet Arslan added a comment - This bug does not exist in trunk. Via the following check : if (!returnFields.wantsField(fname)) { continue ; }
        Hide
        Hoss Man added a comment -

        Committed revision 1304625.

        Ahmet: thanks for the patch and especially the test (note: i tweaked it a bit to focus on ensuring the bad fields weren't returned, instead of expecting an exact string match on the entire response – differnet jvms can iterate map keys in diff orders)

        Show
        Hoss Man added a comment - Committed revision 1304625. Ahmet: thanks for the patch and especially the test (note: i tweaked it a bit to focus on ensuring the bad fields weren't returned, instead of expecting an exact string match on the entire response – differnet jvms can iterate map keys in diff orders)
        Hide
        Hoss Man added a comment -

        Committed revision 1304628 - forward ported the test to trunk to prove bug doesn't exist there

        Show
        Hoss Man added a comment - Committed revision 1304628 - forward ported the test to trunk to prove bug doesn't exist there

          People

          • Assignee:
            Ahmet Arslan
            Reporter:
            Ahmet Arslan
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development