You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2013/01/26 14:19:37 UTC

svn commit: r1438891 - in /lucene/dev/trunk/solr: CHANGES.txt solrj/src/java/org/apache/solr/common/SolrDocument.java solrj/src/java/org/apache/solr/common/SolrInputDocument.java

Author: erick
Date: Sat Jan 26 13:19:37 2013
New Revision: 1438891

URL: http://svn.apache.org/viewvc?rev=1438891&view=rev
Log:
Improved documentation, thanks Benson!

Modified:
    lucene/dev/trunk/solr/CHANGES.txt
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java
    lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java

Modified: lucene/dev/trunk/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/CHANGES.txt?rev=1438891&r1=1438890&r2=1438891&view=diff
==============================================================================
--- lucene/dev/trunk/solr/CHANGES.txt (original)
+++ lucene/dev/trunk/solr/CHANGES.txt Sat Jan 26 13:19:37 2013
@@ -616,6 +616,9 @@ Bug Fixes
 * SOLR-4266: HttpSolrServer does not release connection properly on exception
   when no response parser is used. (Steve Molloy via Mark Miller)
 
+* SOLR-2298: Updated JavaDoc for SolrDocument.addField and SolrInputDocument.addField
+  to have more information on name and value parameters. (Siva Natarajan)
+
 Other Changes
 ----------------------
 

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java?rev=1438891&r1=1438890&r2=1438891&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrDocument.java Sat Jan 26 13:19:37 2013
@@ -108,7 +108,13 @@ public class SolrDocument implements Map
   /**
    * This will add a field to the document.  If fields already exist with this
    * name it will append value to the collection. If the value is Collection,
-   * each value will be added independently.
+   * each value will be added independently. 
+   * 
+   * The class type of value and the name parameter should match schema.xml. 
+   * schema.xml can be found in conf directory under the solr home by default.
+   * 
+   * @param name Name of the field, should match one of the field names defined under "fields" tag in schema.xml.
+   * @param value Value of the field, should be of same class type as defined by "type" attribute of the corresponding field in schema.xml. 
    */
   @SuppressWarnings("unchecked")
   public void addField(String name, Object value) 

Modified: lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java?rev=1438891&r1=1438890&r2=1438891&view=diff
==============================================================================
--- lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java (original)
+++ lucene/dev/trunk/solr/solrj/src/java/org/apache/solr/common/SolrInputDocument.java Sat Jan 26 13:19:37 2013
@@ -63,9 +63,12 @@ public class SolrInputDocument implement
   /** 
    * Add a field with implied null value for boost.
    * 
+   * The class type of value and the name parameter should match schema.xml. 
+   * schema.xml can be found in conf directory under the solr home by default.
+   * 
+   * @param name Name of the field, should match one of the field names defined under "fields" tag in schema.xml.
+   * @param value Value of the field, should be of same class type as defined by "type" attribute of the corresponding field in schema.xml. 
    * @see #addField(String, Object, float)
-   * @param name name of the field to add
-   * @param value value of the field
    */
   public void addField(String name, Object value) 
   {
@@ -132,8 +135,11 @@ public class SolrInputDocument implement
    * field, with the new boost. If the value is a collection, then each of its
    * values will be added to the field.
    *
-   * @param name Name of the field to add
-   * @param value Value of the field
+   * The class type of value and the name parameter should match schema.xml. 
+   * schema.xml can be found in conf directory under the solr home by default.
+   * 
+   * @param name Name of the field, should match one of the field names defined under "fields" tag in schema.xml.
+   * @param value Value of the field, should be of same class type as defined by "type" attribute of the corresponding field in schema.xml. 
    * @param boost Boost value for the field
    */
   public void addField(String name, Object value, float boost )