public class SolrDocument extends Object implements Map<String,Object>, Iterable<Map.Entry<String,Object>>, Serializable
Constructor and Description |
---|
SolrDocument() |
Modifier and Type | Method and Description |
---|---|
void |
addField(String name,
Object value)
This will add a field to the document.
|
void |
clear()
Remove all fields from the document
|
boolean |
containsKey(Object key) |
boolean |
containsValue(Object value) |
Set<Map.Entry<String,Object>> |
entrySet() |
Object |
get(Object key) |
Collection<String> |
getFieldNames() |
Object |
getFieldValue(String name)
Get the value or collection of values for a given field.
|
Map<String,Object> |
getFieldValueMap()
Expose a Map interface to the solr fields.
|
Collection<Object> |
getFieldValues(String name)
Get a collection of values for a given field name
|
Map<String,Collection<Object>> |
getFieldValuesMap()
Expose a Map interface to the solr field value collection.
|
Object |
getFirstValue(String name)
returns the first value for a field
|
boolean |
isEmpty() |
Iterator<Map.Entry<String,Object>> |
iterator()
Iterate of String->Object keys
|
Set<String> |
keySet() |
Object |
put(String key,
Object value) |
void |
putAll(Map<? extends String,? extends Object> t) |
Object |
remove(Object key) |
boolean |
removeFields(String name)
Remove all fields with the name
|
void |
setField(String name,
Object value)
Set a field with the given object.
|
int |
size() |
String |
toString() |
Collection<Object> |
values() |
public Collection<String> getFieldNames()
keySet()
public void clear()
public boolean removeFields(String name)
public void setField(String name, Object value)
public void addField(String name, Object value)
public Object getFieldValue(String name)
public Collection<Object> getFieldValues(String name)
public Map<String,Collection<Object>> getFieldValuesMap()
public Map<String,Object> getFieldValueMap()
public boolean containsKey(Object key)
containsKey
in interface Map<String,Object>
public boolean containsValue(Object value)
containsValue
in interface Map<String,Object>
Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.