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 Oracle ATG Web Commerce Search. The logic used to select the search configuration is based on the tree structure created in Oracle ATG Web Commerce Merchandising. This structure can take into account three dimensions: user segment, site, and locale (referred to in Merchandising as language).

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

The dimension services that create the tree structure in Merchandising, /atg/search/config/LanguageDimensionService, /atg/commerce/search/config/SiteDimensionService, and /atg/commerce/search/config/SegmentDimensionService, are also present on the search client environment. 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) , the user segments he or she is a member of, and the current site. 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. The search configuration rules are applied to the results returned. If there is no matching search configuration, then no search configuration rules are applied.

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

In this example, English is the only language defined, and there are only two segments available, Big Spenders and Californians, and site is not used as a dimension.

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.

Some 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. 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.