Class DefaultSolrInputDocument
- java.lang.Object
-
- de.hybris.platform.solrfacetsearch.indexer.impl.DefaultSolrInputDocument
-
- All Implemented Interfaces:
InputDocument
- Direct Known Subclasses:
DefaultSolrPartialUpdateInputDocument
public class DefaultSolrInputDocument extends java.lang.Object implements InputDocument
Default implementation ofInputDocument.
-
-
Constructor Summary
Constructors Constructor Description DefaultSolrInputDocument(org.apache.solr.common.SolrInputDocument delegate, IndexerBatchContext batchContext, FieldNameProvider fieldNameProvider, RangeNameProvider rangeNameProvider)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddField(IndexedProperty indexedProperty, java.lang.Object value)Same asInputDocument.addField(IndexedProperty, Object, String)with implied null value for the qualifier.voidaddField(IndexedProperty indexedProperty, java.lang.Object value, java.lang.String qualifier)Adds a field for the given indexed property, value and qualifier.voidaddField(java.lang.String fieldName, java.lang.Object value)Adds a field with the given name and value.protected voidendDocument()IndexerBatchContextgetBatchContext()org.apache.solr.common.SolrInputDocumentgetDelegate()FieldNameProvidergetFieldNameProvider()java.util.Collection<java.lang.String>getFieldNames()Get collection of field namesjava.lang.ObjectgetFieldValue(java.lang.String fieldName)Gets the value for a certain field name.RangeNameProvidergetRangeNameProvider()protected voidstartDocument()
-
-
-
Constructor Detail
-
DefaultSolrInputDocument
public DefaultSolrInputDocument(org.apache.solr.common.SolrInputDocument delegate, IndexerBatchContext batchContext, FieldNameProvider fieldNameProvider, RangeNameProvider rangeNameProvider)
-
-
Method Detail
-
getDelegate
public org.apache.solr.common.SolrInputDocument getDelegate()
-
getBatchContext
public IndexerBatchContext getBatchContext()
-
getFieldNameProvider
public FieldNameProvider getFieldNameProvider()
-
getRangeNameProvider
public RangeNameProvider getRangeNameProvider()
-
addField
public void addField(java.lang.String fieldName, java.lang.Object value) throws FieldValueProviderExceptionDescription copied from interface:InputDocumentAdds a field with the given name and value. If a field with the same name already exists, then the given value is appended to the value of that field. If the value is a collection, then each of its values will be added to the field.- Specified by:
addFieldin interfaceInputDocument- Parameters:
fieldName- - the field namevalue- - the field value- Throws:
FieldValueProviderException
-
addField
public void addField(IndexedProperty indexedProperty, java.lang.Object value) throws FieldValueProviderException
Description copied from interface:InputDocumentSame asInputDocument.addField(IndexedProperty, Object, String)with implied null value for the qualifier.- Specified by:
addFieldin interfaceInputDocument- Parameters:
indexedProperty- - the indexed propertyvalue- - the field value- Throws:
FieldValueProviderException- See Also:
InputDocument.addField(IndexedProperty, Object)
-
addField
public void addField(IndexedProperty indexedProperty, java.lang.Object value, java.lang.String qualifier) throws FieldValueProviderException
Description copied from interface:InputDocumentAdds a field for the given indexed property, value and qualifier. If a field for the same indexed property and qualifier already exists, then the given value is appended to the value of that field. If the value is a collection, then each of its values will be added to the field.- Specified by:
addFieldin interfaceInputDocument- Parameters:
indexedProperty- - the indexed propertyvalue- - the field valuequalifier- - the qualifier- Throws:
FieldValueProviderException
-
getFieldValue
public java.lang.Object getFieldValue(java.lang.String fieldName)
Description copied from interface:InputDocumentGets the value for a certain field name.- Specified by:
getFieldValuein interfaceInputDocument- Parameters:
fieldName- - the field name- Returns:
- the field value.
-
getFieldNames
public java.util.Collection<java.lang.String> getFieldNames()
Description copied from interface:InputDocumentGet collection of field names- Specified by:
getFieldNamesin interfaceInputDocument- Returns:
- field name collection
-
startDocument
protected void startDocument()
-
endDocument
protected void endDocument()
-
-