Skip to content

Apache Lucene open-source search software

have remove( name ) return the SolrInputField rather then true/false

Ryan McKinleyf7804a08f8ac
diff --git a/src/java/org/apache/solr/common/SolrInputDocument.java b/src/java/org/apache/solr/common/SolrInputDocument.java
index 26089bcf703..99f94f96027 100644
--- a/src/java/org/apache/solr/common/SolrInputDocument.java
+++ b/src/java/org/apache/solr/common/SolrInputDocument.java
@@ -162,13 +162,14 @@ public class SolrInputDocument implements Iterable<SolrInputField>
}
/**
- * Remove a field
+ * Remove a field from the document
*
- * @param the field name
- * @return true if a field was removed
+ * @param key The field name whose field is to be removed from the document
+ * @return the previous field with <tt>name</tt>, or
+ * <tt>null</tt> if there was no field for <tt>key</tt>.
*/
- public boolean removeField(String name) {
- return _fields.remove( name ) != null;
+ public SolrInputField removeField(String name) {
+ return _fields.remove( name );
}
/**