|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.
| 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 |
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 |
Iterator<Map.Entry<String,Object>> |
iterator()
Iterate of String->Object keys |
boolean |
removeFields(String name)
Remove all fields with the name |
void |
setField(String name,
Object value)
Set a field with the given object. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SolrDocument()
| Method Detail |
|---|
public Collection<String> getFieldNames()
public void clear()
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 Objectpublic 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()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||