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

addField throws exception in SolrDocument

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • None
    • 1.3
    • None
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: