public abstract class SolrDocumentBase<T,K> extends Object implements Map<String,T>, Serializable
Constructor and Description |
---|
SolrDocumentBase() |
Modifier and Type | Method and Description |
---|---|
abstract void |
addChildDocument(K child) |
abstract void |
addChildDocuments(Collection<K> children) |
abstract void |
addField(String name,
Object value)
Add a field to the document.
|
abstract int |
getChildDocumentCount() |
abstract List<K> |
getChildDocuments() |
abstract Collection<String> |
getFieldNames()
Get all field names.
|
abstract Object |
getFieldValue(String name)
Get the first value or collection of values for a given field.
|
abstract Collection |
getFieldValues(String name)
Get a collection of values for a given field name
|
abstract boolean |
hasChildDocuments() |
abstract void |
setField(String name,
Object value)
Set a field with implied null value for boost.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clear, compute, computeIfAbsent, computeIfPresent, containsKey, containsValue, entrySet, equals, forEach, get, getOrDefault, hashCode, isEmpty, keySet, merge, put, putAll, putIfAbsent, remove, remove, replace, replace, replaceAll, size, values
public abstract Collection<String> getFieldNames()
public abstract void setField(String name, Object value)
name
- name of the field to setvalue
- value of the fieldpublic abstract 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.public abstract Object getFieldValue(String name)
public abstract Collection getFieldValues(String name)
public abstract void addChildDocument(K child)
public abstract void addChildDocuments(Collection<K> children)
public abstract boolean hasChildDocuments()
public abstract int getChildDocumentCount()
Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.