|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.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
Constructor Summary | |
---|---|
SolrInputDocument()
|
Method Summary | |
---|---|
void |
addField(String name,
Object value)
Add a field with implied null value for boost. |
void |
addField(String name,
Object value,
float boost)
Remove all fields and boosts from the document |
void |
clear()
Remove all fields and boosts from the document |
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. |
Iterator<SolrInputField> |
iterator()
|
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)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SolrInputDocument()
Method Detail |
---|
public void clear()
public void addField(String name, Object value)
name
- name of the field to addvalue
- value of the fieldaddField(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)
public 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
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |