You may prefer to create a separate XHTML document for each SKU, so that each SKU can be returned as a separate search result. For example, consider an environment where different SKUs for a given product have different prices. With product-based indexing, if a search query specifies a constraint such as “return items whose price is less than $10.00,” the query will return any product that has a SKU whose price is less than $10.00, even if all the other SKUs of that product have higher prices. With SKU-based indexing, the query will return only the individual SKUs whose price is under $10.00.

This behavior is especially desirable for faceted search. Note, however, that indexing by SKU results in a larger index than product-based indexing, because of the larger number of XHTML documents, and therefore can lead to slower performance. If most of your products have only a single SKU, or if your faceting properties have the same value for all of a product’s SKUs (e.g., if you use manufacturer as a faceting property), product-based indexing is more efficient.

Enabling SKU-Based Indexing

To support SKU-based indexing, Oracle ATG Web Commerce includes the DCS.Search.Index.SKUIndexing module. This module makes various configuration changes to Commerce components to enable SKU-based indexing rather than product-based indexing. For example, it modifies the ProductCatalogOutputConfig component’s definition file (product-catalog-output-config.xml), setting the is-document attribute to false for the product item type, and to true for the childSKUs item type.

The following is a sample XHTML document generated for a SKU, based on the product-catalog-output-config.xml definition file. Note that product remains the top-level item, so although a separate document is created for each SKU, the property names are still relative to the product:

<html>
  <head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
    <title>Wheel Cylinder</title>
    <meta name="atg:string:$repositoryId" content="prod10003"/>
    <meta name="atg:date:creationDate" content="988310992"/>
    <meta name="atg:string:$repository.repositoryName"
       content="CustomProductCatalog"/>
    <meta name="atg:string:$itemDescriptor.itemDescriptorName" content="product"/>
    <meta name="atg:string:parentCategory.$repositoryId" content="cat20039"/>
    <meta name="atg:date:parentCategory.creationDate" content="983821019"/>
    <meta name="atg:string:ancestorCategories.$repositoryId" content="cat20002"/>
    <meta name="atg:string:ancestorCategories.$repositoryId" content="cat20039"/>
    <meta name="atg:string,docset:ancestorCategories.catalogSpecificId"
       content="cat20002_300004"/>
    <meta name="atg:string,docset:ancestorCategories.catalogSpecificId"
       content="cat20039_300004"/>
    <meta name="atg:string:catalogs.$repositoryId" content="300004"/>
    <meta name="atg:string,index:childSKUs.$repositoryId" content="sku10004"/>
    <meta name="atg:string:childSKUs.$itemDescriptor.itemDescriptorName"
       content="configurableSku"/>
    <meta name="atg:date:childSKUs.creationDate" content="988311239"/>
    <meta name="atg:float:childSKUs.listPrice" content="0.0"/>
    <meta name="atg:boolean:childSKUs.onSale" content="false"/>
    <meta name="atg:string:childSKUs.$url"
       content="atgrep:/CustomProductCatalog/configurableSku/sku10004?\
       catalog=300004&locale=en_US"/>
    <meta name="atg:string,index:childSKUs.$baseUrl"
       content="atgrep:/CustomProductCatalog/configurableSku/sku10004"/>
  </head>
  <body>
    <div class="atg:role:displayName" id="0">
      Wheel Cylinder
    </div>
    <div class="atg:role:description" id="1">
      Fits GM vehicles
    </div>
    <div class="atg:role:longDescription" id="2">
      Kawaf wheel cylinders are designed to replace OEM parts. Available for
      a variety of applications.
    </div>
    <div class="atg:role:keywords" id="3">
      wheel cylinder
    </div>
    <div class="atg:role:parentCategory.displayName" id="4">
      Drum Components
    </div>
    <div class="atg:role:childSKUs.displayName" id="5">
      wheel cylinder, GM
    </div>
    <div class="atg:role:childSKUs.listPrice" id="6">
      0.0
    </div>
  </body>
</html>

Copyright © 1997, 2013 Oracle and/or its affiliates. All rights reserved. Legal Notices