public class SolrInputDocument extends SolrDocumentBase<SolrInputField,SolrInputDocument> implements Iterable<SolrInputField>
MapWriter.EntryWriter| Constructor and Description | 
|---|
| SolrInputDocument(Map<String,SolrInputField> fields) | 
| SolrInputDocument(String... fields) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addChildDocument(SolrInputDocument child) | 
| void | addChildDocuments(Collection<SolrInputDocument> children) | 
| void | addField(String name,
        Object value)Add a field value to any existing values that may or may not exist. | 
| void | clear()Remove all fields from the document | 
| boolean | containsKey(Object key) | 
| boolean | containsValue(Object value) | 
| SolrInputDocument | deepCopy() | 
| Set<Map.Entry<String,SolrInputField>> | entrySet() | 
| SolrInputField | get(Object key) | 
| int | getChildDocumentCount()The anonymous child document count. | 
| List<SolrInputDocument> | getChildDocuments()Returns the list of child documents, or null if none. | 
| SolrInputField | getField(String field) | 
| Collection<String> | getFieldNames()Get all field names. | 
| Object | getFieldValue(String name)Get the first value for a field. | 
| Collection<Object> | getFieldValues(String name)Get all the values for a field. | 
| boolean | hasChildDocuments()Has anonymous children? | 
| boolean | isEmpty() | 
| Iterator<SolrInputField> | iterator() | 
| Set<String> | keySet() | 
| SolrInputField | put(String key,
   SolrInputField value) | 
| void | putAll(Map<? extends String,? extends SolrInputField> t) | 
| SolrInputField | remove(Object key) | 
| SolrInputField | removeField(String name)Remove a field from the document | 
| void | setField(String name,
        Object value)Set a field value; replacing the existing value if present. | 
| int | size() | 
| String | toString() | 
| Collection<SolrInputField> | values() | 
| void | writeMap(MapWriter.EntryWriter ew) | 
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitforEach, spliteratorcompute, computeIfAbsent, computeIfPresent, equals, forEach, getOrDefault, hashCode, merge, putIfAbsent, remove, replace, replace, replaceAll_forEachEntry, _forEachEntry, _forEachEntry, _get, _get, _getStr, _getStrpublic SolrInputDocument(String... fields)
public SolrInputDocument(Map<String,SolrInputField> fields)
public void writeMap(MapWriter.EntryWriter ew) throws IOException
writeMap in interface MapWriterIOExceptionpublic void clear()
clear in interface Map<String,SolrInputField>public void addField(String name, Object value)
addField in class SolrDocumentBase<SolrInputField,SolrInputDocument>name - Name of the field, should match one of the field names defined under "fields" tag in schema.xml.value - Value of the field, should be of same class type as defined by "type" attribute of the corresponding field in schema.xml.public Object getFieldValue(String name)
getFieldValue in class SolrDocumentBase<SolrInputField,SolrInputDocument>name - name of the field to fetchpublic Collection<Object> getFieldValues(String name)
getFieldValues in class SolrDocumentBase<SolrInputField,SolrInputDocument>name - name of the field to fetchpublic Collection<String> getFieldNames()
getFieldNames in class SolrDocumentBase<SolrInputField,SolrInputDocument>public void setField(String name, Object value)
setField in class SolrDocumentBase<SolrInputField,SolrInputDocument>name - name of the field to setvalue - value of the fieldpublic SolrInputField removeField(String name)
name - The field name whose field is to be removed from the documentpublic SolrInputField getField(String field)
public Iterator<SolrInputField> iterator()
iterator in interface Iterable<SolrInputField>public SolrInputDocument deepCopy()
public boolean containsKey(Object key)
containsKey in interface Map<String,SolrInputField>public boolean containsValue(Object value)
containsValue in interface Map<String,SolrInputField>public Set<Map.Entry<String,SolrInputField>> entrySet()
entrySet in interface Map<String,SolrInputField>public SolrInputField get(Object key)
get in interface Map<String,SolrInputField>public boolean isEmpty()
isEmpty in interface Map<String,SolrInputField>public SolrInputField put(String key, SolrInputField value)
put in interface Map<String,SolrInputField>public void putAll(Map<? extends String,? extends SolrInputField> t)
putAll in interface Map<String,SolrInputField>public SolrInputField remove(Object key)
remove in interface Map<String,SolrInputField>public int size()
size in interface Map<String,SolrInputField>public Collection<SolrInputField> values()
values in interface Map<String,SolrInputField>public void addChildDocument(SolrInputDocument child)
addChildDocument in class SolrDocumentBase<SolrInputField,SolrInputDocument>public void addChildDocuments(Collection<SolrInputDocument> children)
addChildDocuments in class SolrDocumentBase<SolrInputField,SolrInputDocument>public List<SolrInputDocument> getChildDocuments()
getChildDocuments in class SolrDocumentBase<SolrInputField,SolrInputDocument>public boolean hasChildDocuments()
SolrDocumentBasehasChildDocuments in class SolrDocumentBase<SolrInputField,SolrInputDocument>public int getChildDocumentCount()
SolrDocumentBasegetChildDocumentCount in class SolrDocumentBase<SolrInputField,SolrInputDocument>Copyright © 2000-2020 Apache Software Foundation. All Rights Reserved.