If you want to create a separate record for each site, you can do so by using the /atg/search/repository/UniqueSiteVariantProducer component. This component is of class atg.commerce.search.producer.UniqueSiteVariantProducer, 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
siteIdsproperty of the item being indexed.The site is listed in the
sitesToIndexproperty of theEndecaIndexingOutputConfigcomponent 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

