By default, the IncrementalLoader
determines which changes necessitate updates by monitoring the properties specified in the XML definition file. In some cases, however, the properties you want to monitor are not necessarily the ones that you want to output. This is especially the case if you are outputting derived properties, because these properties do not have values of their own.
For example, suppose you are indexing a user
item type that has firstName
and lastName
properties, plus a fullName
derived property whose value is formed by concatenating the values of firstName
and lastName
. You might want to output the fullName
property, but to detect when the value of this property changes, you need to monitor (but not necessarily output) firstName
and lastName
.
You can do this by including a monitor
element in your definition file to specify properties that should be monitored but not output. For example:
<properties> <property name="fullName" text-searchable="true"/> </properties> <monitor> <property name="firstName"/> <property name="lastName"/> </monitor>
For information about derived properties, see the Repository Guide.
You can also monitor properties in a different repository from the one being indexed. For example, if you are using price lists, changes to price
items in the price list repository may necessitate reindexing products or SKUs in the catalog repository that are referenced by these price
items. The atg.repository.search.indexing.listener.QueueingPropertiesChangeListener
class provides a mechanism for triggering reindexing of items in one repository based on changes to items in another repository. See QueueingPropertiesChangeListener in the Handling Price Lists chapter for more information.