If you want to create separate records for each site, you can do so by using the /atg/search/repository/UniqueSiteVariantProducer
component. This component is of class atg.commerce.endeca.index.producer.CommerceUniqueSiteVariantProducer
, which implements the atg.repository.search.indexing.VariantProducer
interface.
UniqueSiteVariantProducer
creates a separate record for each site that meets both of these criteria:
The ID of the site is included in the
siteIds
property of the item being indexed.The site is listed in the
sitesToIndex
property of theEndecaIndexingOutputConfig
component that invokes the variant producer.
For example, if you are indexing by product and the value of a product’s siteIds
property is siteE,siteF,siteG
, and the sitesToIndex
property is set to sites B, E, and F, UniqueSiteVariantProducer
creates two records, one for site E and one for site F. The records are virtually identical, except that each one has a different value for the siteId
property.
To use the UniqueSiteVariantProducer
, add it to the ProductCatalogOutputConfig
component’s variantProducers
property:
variantProducers+=\
/atg/search/repository/UniqueSiteVariantProducer