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

addField throws exception in SolrDocument

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      The following code throws Exception with SolrDocument

      SolrDocument doc = new SolrDocument();
      doc.setField("id",new String []{"a","b"});
      doc.addField("id","c");
      

      Exception

      Exception in thread "main" java.lang.UnsupportedOperationException
      	at java.util.AbstractList.add(AbstractList.java:151)
      	at java.util.AbstractList.add(AbstractList.java:89)
      	at org.apache.solr.common.SolrDocument.addField(SolrDocument.java:136)
      	at Test.main(Test.java:145)
      

        Attachments

        1. SOLR-625.patch
          0.6 kB
          Noble Paul

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              noble.paul Noble Paul
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: