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. The component, /atg/commerce/search/ProductCatalogOutputConfig
, is configured to use the XML definition file /atg/commerce/search/product-catalog-output-config.xml
. This definition file is intended to be used as a starting point; you will typically need to modify it to reflect your catalog and to optimize the XHTML output, as described in the previous chapter.
The following is a sample XHTML document 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>CB Comfy Bike</title> <meta name="atg:string,index:$repositoryId" content="prod10005"/> <meta name="atg:date:creationDate" content="955050507"/> <meta name="atg:date:startDate" content="978325200"/> <meta name="atg:date:endDate" content="1009861200"/> <meta name="atg:string:$url" content="atgrep:/ProductCatalog/frame-product/prod10005?locale=en_US"/> <meta name="atg:string,index:$baseUrl" content="atgrep:/ProductCatalog/frame-product/prod10005"/> <meta name="atg:string:$repository.repositoryName" content="ProductCatalog"/> <meta name="atg:string:$itemDescriptor.itemDescriptorName" content="frame-product"/> <meta name="atg:string:childSKUs.$repositoryId" content="sku20007"/> <meta name="atg:string:childSKUs.$itemDescriptor.itemDescriptorName" content="bike-sku"/> <meta name="atg:date:childSKUs.creationDate" content="955068027"/> <meta name="atg:float:childSKUs.listPrice" content="400.0"/> <meta name="atg:float:childSKUs.salePrice" content="300.0"/> <meta name="atg:boolean:childSKUs.onSale" content="false"/> <meta name="atg:string:parentCategory.$repositoryId" content="cat55551"/> <meta name="atg:date:parentCategory.creationDate" content="956950321"/> <meta name="atg:string,docset:ancestorCategories.$repositoryId" content="cat10002"/> <meta name="atg:string,docset:ancestorCategories.$repositoryId" content="cat10003"/> <meta name="atg:string,docset:ancestorCategories.$repositoryId" content="cat55551"/> </head> <body> <div class="atg:role:displayName" id="0"> CB Comfy Bike </div> <div class="atg:role:longDescription" id="1"> This bike is just right, whether you are a commuter or want to explore the fire roads. The plush front suspension will smooth out the roughest bumps and the big disc brakes provide extra stopping power for those big downhills. </div> <div class="atg:role:keywords" id="2"> mountain_bike comfort_bike </div> <div class="atg:role:childSKUs.displayName" id="3"> CB Comfy Bike Medium </div> <div class="atg:role:childSKUs.listPrice" id="4"> 400.0 </div> <div class="atg:role:childSKUs.description" id="5"> Medium </div> <div class="atg:role:parentCategory.displayName" id="6"> Mountain Bikes </div> </body> </html>