|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.solr.common.SolrInputDocument
public class SolrInputDocument
Represent the field and boost information needed to construct and index a Lucene Document. Like the SolrDocument, the field values should match those specified in schema.xml
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface java.util.Map |
---|
Map.Entry<K,V> |
Constructor Summary | |
---|---|
SolrInputDocument()
|
|
SolrInputDocument(Map<String,SolrInputField> fields)
|
Method Summary | |
---|---|
void |
addChildDocument(SolrInputDocument child)
|
void |
addChildDocuments(Collection<SolrInputDocument> childs)
|
void |
addField(String name,
Object value)
Add a field with implied null value for boost. |
void |
addField(String name,
Object value,
float boost)
Adds a field with the given name, value and boost. |
void |
clear()
Remove all fields and boosts from the document |
boolean |
containsKey(Object key)
|
boolean |
containsValue(Object value)
|
SolrInputDocument |
deepCopy()
|
Set<Map.Entry<String,SolrInputField>> |
entrySet()
|
SolrInputField |
get(Object key)
|
List<SolrInputDocument> |
getChildDocuments()
Returns the list of child documents, or null if none. |
float |
getDocumentBoost()
|
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()
|
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 |
setDocumentBoost(float documentBoost)
|
void |
setField(String name,
Object value)
Set a field with implied null value for boost. |
void |
setField(String name,
Object value,
float boost)
|
int |
size()
|
String |
toString()
|
Collection<SolrInputField> |
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 SolrInputDocument()
public SolrInputDocument(Map<String,SolrInputField> fields)
Method Detail |
---|
public void clear()
clear
in interface Map<String,SolrInputField>
public void addField(String name, Object value)
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.addField(String, Object, float)
public Object getFieldValue(String name)
name
- name of the field to fetch
public Collection<Object> getFieldValues(String name)
name
- name of the field to fetch
public Collection<String> getFieldNames()
public void setField(String name, Object value)
name
- name of the field to setvalue
- value of the fieldsetField(String, Object, float)
public void setField(String name, Object value, float boost)
public void addField(String name, Object value, float boost)
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.boost
- Boost value for the fieldpublic SolrInputField removeField(String name)
name
- The field name whose field is to be removed from the document
public SolrInputField getField(String field)
public Iterator<SolrInputField> iterator()
iterator
in interface Iterable<SolrInputField>
public float getDocumentBoost()
public void setDocumentBoost(float documentBoost)
public String toString()
toString
in class Object
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 Set<String> keySet()
keySet
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)
public void addChildDocuments(Collection<SolrInputDocument> childs)
public List<SolrInputDocument> getChildDocuments()
public boolean hasChildDocuments()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |