mirror of https://github.com/apache/lucene.git
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:
parent
1884a2c84c
commit
f461ea38a2
|
@ -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
|
||||
*/
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue