When a visitor enters a search term on a site that uses Search Merchandising, the software determines which search configuration to apply, and includes this information in the query it sends to ATG Search. The logic used to select the search configuration is based on the tree structure created in ATG Merchandising. This structure can take into account two dimensions, user segment and locale (referred to in ATG Merchandising as language).

The dimension tree structure is stored as repository items in the RefinementRepository. When the product catalog is deployed from the ATG Merchandising environment to the target site, this repository is deployed as well.

The dimension services that create the tree structure in ATG Merchandising, /atg/search/config/LanguageDimensionService and /atg/commerce/search/config/SegmentDimensionService, are also present on the target (search client) site. When a site visitor submits a query entered in a search form, the form handler invokes the /atg/commerce/search/config/SearchConfigNameService component, which uses these services to traverse the decision tree based on the visitor’s language (locale) and the user segments he or she is a member of. It proceeds through the tree until it finds the first search configuration that matches these values. It then adds a reference to this search configuration to the query, which is submitted to ATG Search. ATG Search executes the query, applies the search configuration rules to the results, and returns the results to the client site. If there is no matching search configuration, then no search configuration rules are applied to the query.

For example, suppose the dimension tree created in ATG Merchandising looks like this:

In this example, English is the only language defined, and there are only two segments available, Big Spenders and Californians.

To determine the search configuration to use, the software would proceed like this:

  • Determine the visitor’s language, as described in Determining the Language.

  • If the language is English:

    • Determine if the visitor is a member of the Big Spenders segment. If so, use the Segment: Big Spenders search configuration.

    • If the visitor is not a member of the Big Spenders segment, determine if the visitor is a member of the Californians segment. If so, use the Segment: Californians search configuration.

    • If the visitor is not a member of the Californians segment, use the Segment: All Others search configuration.

  • If the language is not English:

    • Determine if the visitor is a member of the Big Spenders segment. If so, use the Segment: Big Spenders 2 search configuration.

    • If the visitor is not a member of the Big Spenders segment, do not use any search configuration.

A couple of things to note in this example:

  • The ordering of the items in the tree is important. If the visitor’s language is English, and he or she is a member of both the Big Spenders and the Californians segments, the Segment: Big Spenders search configuration is selected, because its position in the tree is above the Segment: Californians search configuration.

  • In a group of dimension folders or search configurations at the same position in the hierarchy, the folder or search configuration whose dimension value is All Others is always the last item in that group of folders or search configurations. In the example above, the Language: All Others folder comes after Language: English, and the Segment: All Others search configuration comes after Segment: Big Spenders and Segment: Californians. ATG Merchandising enforces this ordering to ensure that a folder or search configuration whose dimension value is All Others is used only if the visitor’s value for that dimension doesn’t match any other folder or configuration.

 
loading table of contents...