One way you can use query rules is to ensure that a particular search result is displayed when customers use particular words or phrases in their search terms. For example, if someone enters a search “where is MyBusiness located,” you want to make sure that your company’s Contact Information page is displayed first in the search results, even though the search terms do not appear in the indexed page text. To accomplish this, you can use an arbitrary query rule action with the following syntax:

action,arg,arg,...

The arg arguments are arbitrary strings which are returned back with the search results in a comma-delimited list. Your search user interface must include code that knows how to interpret those arguments via the Oracle ATG Web Commerce Search API (see the ATG Search Query Guide for information). For example, to redirect users you could use something resembling the following argument list:

action,auto,http://www.xyz.com/foo.html

Your client code could then redirect users to the returned URL. An example of this use can be seen the Oracle ATG Web Commerce Merchandising search configurations, which allow you to create redirection rules that are translated by Search into query rules.


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