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

Cannot "set" multiple values into multivalued field with partial updates when using the standard RequestWriter.

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.0
    • Fix Version/s: 4.1
    • Component/s: clients - java, update
    • Labels:
      None

      Description

      I would like to "set" multiple values into a field using partial updates like so:

      List<String> values = new ArrayList<String>();
      values.add("one");
      values.add("two");
      values.add("three");
      doc.setField(field, singletonMap("set", values));
      

      When using the standard XML-based RequestWriter, you end up with a single value that looks like [one, two, three], because of the toString() calls on lines 130 and 132 of ClientUtils. It works properly when using the BinaryRequestWriter.

        Attachments

        1. SOLR-4134.patch
          9 kB
          Shalin Shekhar Mangar
        2. SOLR-4134.patch
          8 kB
          Shalin Shekhar Mangar
        3. SOLR-4134-nolist-fix.patch
          3 kB
          Shalin Shekhar Mangar

        Issue Links

          Activity

            People

            • Assignee:
              shalin Shalin Shekhar Mangar
              Reporter:
              willbutler Will Butler

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment