Search Manual / Version 2512.0
Table Of ContentsA feedable is an object which is generated from the data of a content bean and which the CAE Feeder sends to the Search Engine for indexing. Customizing feedables means that you define which values from a content bean are mapped to fields of the feedable and are therefore added to the index if a corresponding Solr index field exists. The following paragraphs describe the involved classes.
An implementation of com.coremedia.cap.feeder.persistentcache.KeyTransformer is used to create identifiers for Search Engine documents in the index. The default KeyTransformer implementation creates identifiers of the same format as the IdProvider of the CoreMedia CAE.
Example: a content bean for the content with the numerical id 42 is
represented by an Apache Solr document with the value
contentbean:42 in the field id. Search applications can use the
IdProvider to get a content bean for the identifier again.
The CAE Feeder uses implementations of the com.coremedia.cap.feeder.populate.FeedablePopulator interface to set elements of the feedable with content bean data. By default, a BeanMappingFeedablePopulator is used, which can be configured to map data from ContentBean instances to elements of the created feedable.
For more flexibility, you can configure additional custom FeedablePopulator
implementations and add them to the Spring bean feedablePopulators, which is a list of
FeedablePopulator<T> beans. Each configured populator can add different parts
of data to the same feedable. The type parameter <T> of a configured
FeedablePopulator bean must be ContentBean, Content or a super type
of these. You can find some existing FeedablePopulator implementations in package
com.coremedia.cap.feeder.populate. For example, you may configure
an additional PropertyPathFeedablePopulator to index certain nested values of struct properties.
FeedablePopulator implementations should avoid throwing exceptions, but if they
do throw an unexpected exception, then the CAE Feeder
will index a so-called error document as placeholder. Error
documents can be recognized by the value ERROR in the index field
feederstate. The stack trace of the exception is stored in the index field
feederinfo. Do not forget to always add a feederstate:SUCCESS
filter query to Solr queries to find successfully indexed documents. Feeding will be retried
automatically after 10 minutes by default, or when a dependency is invalidated that was
accessed before the exception was thrown. See configuration property
caefeeder.evaluation.error-retry-delay in
Section 3.11, “CAE Feeder Properties” in Deployment Manual
if you want to change the retry delay.


