For indexing, commerce catalogs are typically broken down by product. Each product item is transformed into an XHTML document based on a definition file. The definition file specifies that each output document should include information about the product’s parent category and child SKUs (as well as the product itself), so that site visitors can search category or SKU properties in addition to product properties.

The DCS.Search module includes an IndexingOutputConfig component and definition file that are preconfigured to work with a typical catalog repository. You can use this component and definition file as is, or modify them or create your own component based on them. The component, /atg/commerce/search/ProductCatalogOutputConfig, is configured like this:

definitionFile=/atg/commerce/search/product-catalog-output-config.xml
bulkLoader=/atg/search/repository/BulkLoader
incrementalLoader=/atg/search/repository/IncrementalLoader
enableIncrementalLoading=false
variantProducers=LocaleVariantProducer
indexingSynchronizations+=\
        /atg/commerce/search/refinement/RefinementConfigurationSubmitter

The XML definition file, product-catalog-output-config.xml, is designed to output the catalog properties that users are most likely to search for, and exclude the least likely ones. For example, it includes the product’s display name and description properties and the list price and sale price of the child SKUs, but omits all image properties.

The following is a sample XHTML file generated for a product, based on the product-catalog-output-config.xml definition file:

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
    <title>strawberries (organic)</title>
    <meta name="atg:string,index:$repositoryId" content="prod10015"/>
    <meta name="atg:date:creationDate" content="1149279750"/>
    <meta name="atg:string:displayName" content="strawberries (organic)"/>
    <meta name="atg:string:description" content="organic strawberries"/>
    <meta name="atg:string:longDescription" content="Organic strawberries for your
    eating pleasure. Pesticide free and great tasting too."/>
    <meta name="atg:string:$repository.repositoryName"
    content="CustomProductCatalog"/>
    <meta name="atg:string:$itemDescriptor.itemDescriptorName" content="product"/>
    <meta name="atg:string:$url"
    content="atgrep:/CustomProductCatalog/product/prod10015?
    catalog=catalog10003&amp;locale=en_US"/>
    <meta name="atg:string:$baseUrl"
    content="atgrep:/CustomProductCatalog/product/prod10015"/>
    <meta name="atg:string:childSKUs.$repositoryId" content="sku10018"/>
    <meta name="atg:date:childSKUs.creationDate" content="1149279810"/>
    <meta name="atg:string:childSKUs.type" content="sku"/>
    <meta name="atg:float:childSKUs.wholesalePrice" content="2.0"/>
    <meta name="atg:float:childSKUs.listPrice" content="3.99"/>
    <meta name="atg:float:childSKUs.salePrice" content="2.49"/>
    <meta name="atg:boolean:childSKUs.onSale" content="false"/>
    <meta name="atg:string:childSKUs.displayName" content="strawberries pint
    (organic)"/>
    <meta name="atg:string:childSKUs.$repository.repositoryName"
    content="CustomProductCatalog"/>
    <meta name="atg:string:childSKUs.$itemDescriptor.itemDescriptorName"
    content="sku"/>
    <meta name="atg:string:childSKUs.$repositoryId" content="sku10020"/>
    <meta name="atg:date:childSKUs.creationDate" content="1149279836"/>
    <meta name="atg:string:childSKUs.type" content="sku"/>
    <meta name="atg:float:childSKUs.wholesalePrice" content="3.99"/>
    <meta name="atg:float:childSKUs.listPrice" content="6.99"/>
    <meta name="atg:float:childSKUs.salePrice" content="4.99"/>
    <meta name="atg:boolean:childSKUs.onSale" content="false"/>
    <meta name="atg:string:childSKUs.displayName" content="strawberries quart
    (organic)"/>
    <meta name="atg:string:childSKUs.description" content="quart of organic
    strawberries"/>
    <meta name="atg:string:childSKUs.$repository.repositoryName"
    content="CustomProductCatalog"/>
    <meta name="atg:string:childSKUs.$itemDescriptor.itemDescriptorName"
    content="sku"/>
    <meta name="atg:string:parentCategory.$repositoryId" content="cat10009"/>
    <meta name="atg:date:parentCategory.creationDate" content="1149279681"/>
    <meta name="atg:string:parentCategory.displayName" content="organic berries"/>
    <meta name="atg:string:parentCategory.$repository.repositoryName"
    content="CustomProductCatalog"/>
    <meta name="atg:string:parentCategory.$itemDescriptor.itemDescriptorName"
    content="category"/>
    <meta name="atg:string:ancestorCategories.$repositoryId" content="cat10005"/>
    <meta name="atg:date:ancestorCategories.creationDate" content="1149258114"/>
    <meta name="atg:string:ancestorCategories.displayName" content="berries"/>
    <meta name="atg:string:ancestorCategories.$repository.repositoryName"
    content="CustomProductCatalog"/>
    <meta name="atg:string:ancestorCategories.$itemDescriptor.itemDescriptorName"
    content="category"/>
    <meta name="atg:string:ancestorCategories.$repositoryId" content="cat10009"/>
    <meta name="atg:date:ancestorCategories.creationDate" content="1149279681"/>
    <meta name="atg:string:ancestorCategories.displayName" content="organic
    berries"/>
    <meta name="atg:string:ancestorCategories.$repository.repositoryName"
    content="CustomProductCatalog"/>
    <meta name="atg:string:ancestorCategories.$itemDescriptor.itemDescriptorName"
    content="category"/>
    <meta name="atg:string:catalogs.$repositoryId" content="catalog10003"/>
    <meta name="atg:string:catalogs.$repository.repositoryName"
    content="CustomProductCatalog"/>
    <meta name="atg:string:catalogs.$itemDescriptor.itemDescriptorName"
    content="catalog"/>
  </head>
  <body>
    <div class="atg:role:displayName" id="0">strawberries (organic)</div>
    <div class="atg:role:description" id="1">organic strawberries</div>
    <div class="atg:role:longDescription" id="2">Organic strawberries for your
    eating pleasure. Pesticide free and great tasting too.</div>
    <div class="atg:role:childSKUs.displayName" id="3">strawberries pint
    (organic)</div>
    <div class="atg:role:childSKUs.displayName" id="4">strawberries quart
    (organic)</div>
    <div class="atg:role:childSKUs.description" id="5">quart of organic
    strawberries</div>
    <div class="atg:role:parentCategory.displayName" id="6">organic berries</div>
    <div class="atg:role:ancestorCategories.displayName" id="7">berries</div>
    <div class="atg:role:ancestorCategories.displayName" id="8">organic
    berries</div>
  </body>
</html>
 
loading table of contents...