Sites may use the grouping-by-product feature to collapse all SKU results associated with a given product into a single result. In order to use grouping, you indicate in the configuration of your Search Index Output Configuration file that you want to index by SKU rather than index by product.

In order for grouped items to display the way you prefer in Search Testing, make the necessary configurations described in Displaying SKUs Grouped by Product.

By default, if you index by SKU, your items will be grouped. To view results as ungrouped, you need to disable grouping in search testing, as described in Disabling Grouping. Grouping is unavailable if you index by product.

Displaying SKUs Grouped by Product

Whether groupings display as a single product with information about one SKU or individual products in the search testing results list depends on the usage of the sub-item Results input. For more information about setting these properties, see the ATG Commerce Search Guide.

If your site displays groupings and you’d like to replicate your site behavior in a search test, follow these steps:

  1. Locate the Query Request component by checking the searchRequest property of the /atg/commerce/search/testing/SearchTestingQueryFormHandler for the name and location of the Query Request component. The default is /atg/commerce/search/catalog/QueryRequest.

  2. Set the following Query Request properties:

    sorting=property
    sortProperty=string:$repositoryId:1

  3. Configure the responseNumberSettings map property to return groupings in the way you prefer:

    • prop determines the maximum number groupings to return. Keep in mind that 10 results display in the first page of the result list.

    • perProp establishes the maximum number of SKUs per product.

    For example, the following settings return a maximum of 100 groupings each containing no more than 20 SKUs:

    QueryRequest.responseNumberSettings=prop=100,perProp=20

For more information on grouping and setting up grouping, see the Standard Query Results section of the Standard Query chapter in the ATG Search Query Reference Guide.

Disabling Grouping

If you index by SKU and don’t want results grouped by product in search test results, you need to replace the following property values:

 
loading table of contents...