|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.common.SolrDocument
public class SolrDocument
A concrete representation of a document within a Solr index. Unlike a lucene Document, a SolrDocument may have an Object value matching the type defined in schema.xml For indexing documents, use the SolrInputDocument that contains extra information for document and field boosting.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
SolrDocument()
|
Method Summary | |
---|---|
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()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Map |
---|
equals, hashCode |
Constructor Detail |
---|
public SolrDocument()
Method Detail |
---|
public Collection<String> getFieldNames()
keySet()
public void clear()
clear
in interface Map<String,Object>
public boolean removeFields(String name)
public void setField(String name, Object value)
public void addField(String name, Object value)
public Object getFirstValue(String name)
public Object getFieldValue(String name)
public Collection<Object> getFieldValues(String name)
public String toString()
toString
in class Object
public Iterator<Map.Entry<String,Object>> iterator()
iterator
in interface Iterable<Map.Entry<String,Object>>
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>
public Set<Map.Entry<String,Object>> entrySet()
entrySet
in interface Map<String,Object>
public Object get(Object key)
get
in interface Map<String,Object>
public boolean isEmpty()
isEmpty
in interface Map<String,Object>
public Set<String> keySet()
keySet
in interface Map<String,Object>
public Object put(String key, Object value)
put
in interface Map<String,Object>
public void putAll(Map<? extends String,? extends Object> t)
putAll
in interface Map<String,Object>
public Object remove(Object key)
remove
in interface Map<String,Object>
public int size()
size
in interface Map<String,Object>
public Collection<Object> values()
values
in interface Map<String,Object>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |