public interface IndexedDataFactory
IndexedData
objects for one IndexConfiguration instance. It may also specify which item type attributes are actually
available for indexing e.g. string attributes only.
Nevertheless a indexed data factory is not limited to actual attribute values of items - it may add any (text) data
which is required inside the index. For instance a PDFMedia factory may translate the raw PDF data into text and
put it into a index field together with standard item attributes.
The implementation class should be configured for each IndexConfiguration by setting the class name via
GeneratedIndexConfiguration.setIndexedDataFactoryClassName(String).
If nothing has been specified the default factory implementation DefaultIndexedDataFactory is used.
Each implementations must provide a public no-arg constructor.| Modifier and Type | Method and Description |
|---|---|
void |
documentCreated(IndexConfiguration config,
IndexedData data,
Document doc)
Called after all item fields has been put into a
Document just before writing the document into the lucene
index. |
Collection<AttributeDescriptor> |
getActivationAttributes(IndexConfiguration config)
Deprecated.
|
Collection<AttributeDescriptor> |
getGroupingAttributes(IndexConfiguration config)
Deprecated.
|
Collection<AttributeDescriptor> |
getIndexableAttributes(IndexConfiguration config)
Provides all attributes of the composed type of the specified
IndexConfiguration which this factory is
able to translate into index data. |
List<PK> |
getIndexableItems(IndexConfiguration config)
Provides all indexable items for a given index configuration object as one huge list of PK objects.
|
Collection<IndexedData> |
getIndexedData(IndexConfiguration config,
Collection<Item> item)
Called upon index update process.
|
boolean |
needUpdate(IndexConfiguration config,
Date lastRebuildTimestamp)
Tells whether or not the indexed data of a
IndexConfiguration is up to date given the last build or update
time stamp. |
Collection<AttributeDescriptor> getIndexableAttributes(IndexConfiguration config)
IndexConfiguration which this factory is
able to translate into index data.config - the index configuration specifying the actual ComposedType@Deprecated Collection<AttributeDescriptor> getGroupingAttributes(IndexConfiguration config)
@Deprecated Collection<AttributeDescriptor> getActivationAttributes(IndexConfiguration config)
boolean needUpdate(IndexConfiguration config, Date lastRebuildTimestamp)
IndexConfiguration is up to date given the last build or update
time stamp.config - the index configuration to check status forlastRebuildTimestamp - the last index rebuild or update timeList<PK> getIndexableItems(IndexConfiguration config)
config - the index configuration to get all items forCollection<IndexedData> getIndexedData(IndexConfiguration config, Collection<Item> item)
IndexedData object for each specified item
if it is covered by the specified IndexConfiguration.void documentCreated(IndexConfiguration config, IndexedData data, Document doc)
Document just before writing the document into the lucene
index.
Use this hook to perform document modifications like setting its boost factor.
config - the index configuration which this document has been created fordata - the data record which provided all document fields.doc - the new document objectCopyright © 2017 SAP SE. All Rights Reserved.