SOLR-193 -- adding clear() to the SolrDocuemnt API. This was used in the parallel SOLR-20 implementaion.

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@547003 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Ryan McKinley 2007-06-13 19:11:30 +00:00
parent 1884a2c84c
commit f461ea38a2
2 changed files with 21 additions and 0 deletions

View File

@ -65,6 +65,15 @@ public class SolrDocument
// Add / Set / Remove Fields
///////////////////////////////////////////////////////////////////
/**
* Remove all fields from the document
*/
public void clear()
{
_fields.clear();
}
/**
* Remove all fields with the name
*/

View File

@ -32,6 +32,18 @@ import java.util.Map;
public class SolrInputDocument extends SolrDocument
{
private Map<String,Float> _boost = null;
/**
* Remove all fields and boosts from the document
*/
@Override
public void clear()
{
super.clear();
if( _boost != null ) {
_boost.clear();
}
}
/**
* Set the document boost. null will remove the boost