You can use Ranking Rules to control the relative positioning or ranking of a customer’s search results based on contained meta tag content and related Adobe Analytics metrics.
You define ranking rules to affect the relative placement of the documents within your search results, based on the contents of each document. You can base ranking rules either on meta tag content, Adobe Analytics metrics (if your account is configured to work with Adobe Analytics), or Adobe Analytics HBX metrics (if your account is configured to work with Adobe Analytics HBX).
You can set web pages that contain meta tags with desired characteristics, such as a certain brand name or price, or web pages that have desirable Adobe Analytics key performance indicators, such as unique viewers, to receive a higher ranking than web pages that do not. The “desirable” characteristics are easily updated by adding or editing Ranking Rules and then re-indexing your website.
If you have more than one meta tag of type “rank” defined, you can create separate collections of rules to use in calculating the various rank fields. You can add a ranking rule group, which you can then assign to one of your defined Rank fields. Rule groups normally contain one or more rule definitions, but can also refer to other Rule groups, so you can create one or more groups of commonly used rules that are shared during the calculation of your multiple ranks.
See Adding a ranking rule group.
A positive rank value promotes search results towards the top; a negative rank value demotes search results towards the bottom of the search results. The normal range for ranking values is 1.0 which is the maximum promotion within the search results, while -1.0 is the maximum demotion. While you can customize this range by editing the Rank field in metadata definitions, this type of customization is usually unnecessary.
See About Definitions.
If you have defined more than one rank field under Settings > Metadata > Definitions, you have the option to create additional sets of ranking rules, one for each rank field. You can defined additional sets of ranking rules without being directly associated with a rank field. This flexibility lets you create sets of common Rules that can be shared in the calculation of one or more rank value.
Important: Before you can use Ranking Rules, there are several account configuration steps that you must complete.
Before you can use ranking rules, there are several account configuration steps that you must complete.
To configure ranking
Choose from the following:
Task |
Configuration |
---|---|
To create ranking rules that are based on meta tags |
|
To create ranking rules that are based on Adobe Analytics metrics |
|
Add one or more Ranking Rules.
Click regenerate your staged site index to perform a full-reindex of your website (from Index > Full Index).
Check the values in the Rank column in Settings > Metadata > Definitions to verify that your Ranking Rules were applied correctly.
You can rank an HTML document by its age with an exponential decay function. The rate of decay is specified with a chosen half-life constant, the amount of time that must pass before the value drops to one half of its initial value.
Age ranking is based on the following two equations:
K = -ln(2) / H
RANK = e^(K * T)
Variables H
and T
are inputs to this function: H
is the desired half-life period and T
is the document’s age, expressed in seconds. K
is the calculated half-life, and RANK
is the exponential decay of the specified age value. The resulting value is from 0 through 1. A more recent document has a rank value closer to 1 compared to an older document. In theory, documents should never reach the value of 0, but rounding errors can cause a result to become 0.
search_get_age_rank()
, as specified in the Add or Edit Ranking Rule pages, is used to calculate a document’s age rank. The next sections describe in detail the general use of the age-ranking function. An example is also presented that demonstrates the age-ranking feature.Specify search_get_age_rank()
as follows:
search_get_age_rank(Birthdate#Half_Life#Default_Rank)
{field_name}
.Example
In the following example,
search_get_age_rank({birthdate}#28#0.20)
the date contained in the document’s birthdate
field is passed in as the time-stamp. The half life is 28 days. The default ranking value is 0.20 if the date is invalid.
See the options table in Adding a ranking rule.
In the Values/Ranks section of the Add Ranking Rule page or the Edit Ranking Rule page, you can only use search_get_age_rank
with custom-made rules. Therefore, be sure that you choose Custom from the Values/Ranks drop-down list. When the rule uses the age-ranking function, no spaces are allowed in the values part of the rule. Be sure that there are no spaces in the function arguments or in between them. And, there are no spaces between any mathematical or conditional operators.
The following is an example of a values/ranks rule—a rule associated with a text field:
regexp .* search_get_age_rank({other_field}#365#0.20)
This example assumes that other_field
contains a date value. If this field is not itself a date-type field, this value is interpreted using the date formats associated with the pre-defined Date field. Otherwise, this field’s date formats are used. This values/ranks entry is used whenever the document’s field, that the Rule’s Data Source identifies, is non-empty, and the function’s return value (from 0 through 1) is the assigned rank.
For a Rule associated with a Numeric field, specifically a Date field:
9999999999 search_get_age_rank({other_field}#365#0.20)
As each document is processed, the value in other_field
is converted to the Unix “epoch” form, using the field’s date format definitions. This value is used in the search_get_age_rank()
call. As every “epoch” value is less than 9999999999 (for now at least), the Rule simply supplies the function’s return value (from 0 through 1) as the rank.
In both of the preceding examples, it is typical that the Rule’s Data Source is the same field that is used in the search_get_age_rank()
function - other_field
in this case.
The following is an example of how you can integrate age ranking into ranking rules. The example also shows you the raw results from the age-ranking function and the results from the ranking rules. The example assumes the following:
Ranking rules
See Adding a new meta tag field.
Now you add a new ranking rule. The rule is defined to use the “birthdate” field on the document. A new ranking rule is added with the following properties set:
The rule does several things. The weight of the rule is set to 10. The rank value is simply the result of the age-rank function, a value from 0 through 1. You cannot use spaces with search_get_age_rank()
. Also, notice that the field “birthdate” is enclosed in braces. Finally, when you save this rule, the commas in the Values/Ranks definition are replaced with #
characters; this behavior is normal.
Viewing the results
Use the Data View feature to quickly see the results of the age-rank function. Add the appropriate Metadata fields. In the example, age_val
and myrank
are the two Metadata fields that should be added to the Data View. The myrank
field shows how age ranking affects the ranking values. The age_val
field shows the raw output of the exponential-decay function for that document.
The following are three default values involved with the function search_get_age_rank()
:
search_get_age_rank()
function itself.Depending on where the failure occurs, you may get different default values.
For example, the default value from the Metadata definition should never happen if Ranking and Filtering is properly implemented. This default value is the last resort value when no valid or known content for that Metadata field exists. The default value from the ranking rules may appear when search_get_age_rank()
is referencing its own associated tag and the tag is missing in the document. In this case, this rule goes straight to the rule’s default value. If the age-ranking function references another ranking rule’s tag, it is possible that the default value passed into that age-ranking function is used if the referenced tag is missing or invalid.
You can add Ranking Rules to affect the relative placement of the web pages within your Search results, based on the contents of each web page.
See Configuring ranking.
To add a ranking rule
On the product menu, click Rules > Ranking Rules > Edit Rules.
(Optional) If you have created a rules group and added rules to the group, on the Define Ranking Rules page, in the Select Rule Group drop-down list, select a rule group that contains the rules you want to edit.
On the Define Ranking Rules page, click Add Rule to add a new Ranking Rule, or to add a reference to a Rule set.
On the Add Ranking Rule page, set the options you want. Fields that are marked with an asterisk (*) are required.
The Data Source Type that you select affects the choices that are available on the Data Source Name drop-down list. For example, if you selected Meta Tag as the Data Source Type, the Data Source Name refers to the name of a meta tag on your website pages. If you selected Adobe Analytics Metric (Number), the Data Source Name refers to one of the Adobe Analytics metric names that you selected in a Report Suite as found on the Edit Adobe Analytics Metrics page in site search/merchandising.
See Editing the Adobe Analytics metrics of a Report Suite.
Option |
Description |
---|---|
Data Source Type |
Determines the characteristics of the data source that is used as the input to this ranking rule. Data source types that you can select from include the following:
|
Data Source Name |
If you chose Meta Tag as the Data Source Type, this is the name of a meta tag that is found within the pages of your website. The names in the drop-down menu come from the list of defined metadata values that were configured in Settings > Metadata > Definitions. See Adding a new meta tag field . If you chose Adobe Analytics Metric (Number) as the Data Source Type, this is the name of a Adobe Analytics metric. The names in the drop-down menu, come from the list defined available Adobe Analytics metrics that were configured in Settings > Adobe Analytics > Metrics > Edit. See Editing the Adobe Analytics metrics of a Report Suite . If the Adobe Analytics metric name that you selected is not already defined in Settings > Metadata > Definitions , a text field and an Add button are displayed. Enter the name of the Metadata Field Name (the metadata field name cannot exceed 20 characters), and then click Add . When pages are encountered with multiple Adobe Analytics keys, as with a product page displaying multiple products, Composite Scheme specifies how to deal with the multiple Adobe Analytics metric values associated with that page. Select one of the following:
|
Weights/Conditions |
Contains either a simple, single rule weight number, or a paired list of rules weight numbers and test conditions. A rule weight number is a value from 1-10 that indicates how important this ranking rule is relative to the other ranking rules in determining the overall rank of a document. A higher rule weight indicates higher importance. A weight of zero (0) ignores the rule. Choose Custom from the drop-down list to customize the rule weight for various pages by defining a list of rule weight/test conditions pairs. Test conditions are fragments of Perl that are used to test Data Source Values, or global variables that are defined within your custom filter script (for example, price, brand, season, or page views as in the following example). If a test condition evaluates to "true," the associated rule weight value is applied. If a test condition evaluates to "false,", the next condition in the list is evaluated. You should always provide a rule weight with no condition at the end of the list. If you do not do this, the rule gets a weight of 0 in the case where none of the condition tests evaluate to "true." |
Values/Ranks |
Consists of either one of the built-in ranking functions, or possible Data Source content along with desired ranks. If you chose Adobe Analytics Metric (Number) as the Data Source Type, you are presented with a drop-down list with the following options:
The rank values returned from the Auto-Rank calculations are in the range 0.0 (lowest) to 1.0 (highest). They are not adjusted according to the ranges that are defined for the Rank field under Settings > Metadata > Definitions. In the following example, if the brand Data Source for a particular search result exactly matches "DKNY," the applied rank for that result is 0.5. Otherwise, if the brand is "Levis," the applied rank is 0.1. The Data Source content must match the set value. In other words, If the Data Source content is "Levis Corp.", it will not match the value "Levis". Case is ignored, so "DKNY" matches "dkny" and "Dkny". As a more advanced option, you can specify values as regular expressions. For example, suppose some of your site pages contain a brand value of "Levis" and other site pages contain a brand value of "Levis jeans." You can use a regular expression specified with the keyword
See Regular Expressions . In the following example, a search result document containing brand content "Levis jeans" is assigned a rank of 0.1. As with standard comparison, case is ignored for regular expressions. |
Default Rank |
Specifies the rank to apply for search result documents that do not match any of the specified values. In the above example, a search results document with a "brand" Data Source containing "the gap" is assigned the default rank value because "the gap" does not match any of the defined values. |
Notes |
Add information that pertains to the ranking rule definition or the rule group definition that you created. |
The range of valid rank values is normally -1.0 to 1.0 as in the following:
-1.0
is “Minimum Rank (display lower in the search results).”0.0
is “Neutral rank (do not change search results order).”1.0
is “Maximum rank (display higher in the search results.”Defined ranks should be within the same range for every rule. The rank ranges must also match the ranges that are defined for the Rank field under Settings > Metadata > Definitions.
See Adding a new meta tag field.
See also Editing a ranking rule.
Click Add.
To preview the results of the rule addition, click regenerate your staged site index to rebuild your staged website index.
See Running a full index of a live or staged website….
See Running an incremental index of a live or staged website….
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
You can edit an existing ranking rule that you have already added.
See Configuring ranking.
To edit a ranking rule
On the product menu, click Rules > Ranking Rules > Edit Rules.
(Optional) If you have created a rules group and added any rules to the group, on the Define Ranking Rules page, in the Select Rule Group drop-down list, select a rule group that contains the rules you want to edit.
In the table, under the Actions column header, click Edit for the data source name you want to change.
On the Edit Ranking Rule page, set the options that you want. Fields that are marked with an asterisk (*) are required.
See the table of options under Adding a ranking rule.
Click Save Changes.
Rebuild your staged website index to preview the results of the rule edit.
See Running a full index of a live or staged website….
See Running an incremental index of a live or staged website….
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
You can delete ranking rules that you no longer need to use.
See Configuring ranking.
See Adding a ranking rule group.
To delete a ranking rule
On the product menu, click Rules > Ranking Rules > Edit Rules.
(Optional) If you have created a rules group and added any rules to the group, on the Define Ranking Rules page, in the Select Rule Group drop-down list, select a rule group that contains rules that you want to delete.
In the table, under the Actions column header, click Delete for the data source name you want to change.
On the Delete Ranking Rule page, click Delete.
You are returned to the Define Ranking Rules page.
Rebuild your staged website index to preview the results of the rule deletion.
See Running a full index of a live or staged website….
See Running an incremental index of a live or staged website….
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
If you have defined more than one meta tag of type “rank”, you can create separate collections of rules to use in calculating the various rank fields. You can add a ranking rule group, which you can then assign to one of your defined Rank fields.
Rule groups usually contain one or more rules that you have added. However, Rule groups can also refer to other Rule groups. For example, you can create one or more rules groups and then add commonly used rules to each one. Those rules are then shared during the calculation of your multiple ranks.
See Editing a ranking rule group.
See Deleting a ranking rule group.
See Reviewing ranking rule groups.
To add a ranking rule group
On the product menu, click Rules > Ranking Rules > Edit Rules.
On the Define Ranking Rules page, to the right of the Select Rule Group drop-down list, click Add.
On the Add Ranking Rule Group page, in the Rule Group Name field, type a unique name for the new rule group.
In the Rank Field Name drop-down list, select a rank metadata field name that you want to associate with the new rule group. Select None if you do not want to assign a rank.
The list of rank field names comes from metadata definitions that were added in Settings > Metadata > Definitions.
See the table of options in Adding a new meta tag field.
Click Add.
Rebuild your staged website index to preview the results of the rule addition.
See Running a full index of a live or staged website….
See Running an incremental index of a live or staged website….
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
You can edit the settings of an existing ranking rule group.
See Adding a ranking rule group.
To edit a ranking rule group
On the product menu, click Rules > Ranking Rules > Edit Rules.
On the Define Ranking Rules page, to the right of the Select Rule Group drop-down list, click Edit.
On the Edit Ranking Rule Group page, in the Rule Group Name field, type a unique name for the rule group.
In the Rank Field Name drop-down list, select a rank metadata field name that you want to associate with the rule group. Select None if you do not want to assign a rank.
The list of rank field names comes from metadata definitions that were added in Settings > Metadata > Definitions.
See the table of options in Adding a new meta tag field.
Click Save Changes.
Rebuild your staged website index to preview the results of the rule addition.
See Running a full index of a live or staged website….
See Running an incremental index of a live or staged website….
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
You can delete a Ranking Rule Group that you no longer need or use. When you delete a group, any Rules that were added to the group, are also deleted. You cannot delete the default “Ranking Rules” group.
The contents of any Rule Groups that are contained in the delete group are not deleted; only the references to these groups are removed.
Be sure you reindex your website so that the change is properly reflected in the search results.
See Adding a ranking rule group.
To delete a ranking rule group
On the product menu, click Rules > Ranking Rules > Edit Rules.
On the Define Ranking Rules page, in the Select Rule Group drop-down list, select a group that you want to delete.
To the right of the Select Rule Group drop-down list, click Delete.
On the Delete Ranking Rule Group page, click Delete.
Rebuild your staged website index to preview the results of the rule addition.
See Running a full index of a live or staged website….
See Running an incremental index of a live or staged website….
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
You can use Ranking Rule Groups Overview to see each groups Rank Field name, and associated data source and weighting.
See Adding a ranking rule group.
To review ranking rule groups
On the product menu, click Rules > Ranking Rules > Edit Rules.
On the Define Ranking Rules page, to the right of the Select Rule Group drop-down list, click Overview.
On the Ranking Rule Groups Overview page, click Close to return to the Define Ranking Rules page.
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
You can provide a suitable URL test the Ranking Rule definitions that you have set up. The metrics used in the calculations are displayed, along with the calculated Rank value.
See About Ranking Rules.
To test ranking rules
On the product menu, click Rules > Ranking Rules > Edit Rules.
On the Define Ranking Rules page, in the Test URL area, type the URL to a web page that is on your website.
Click Test.
(Optional) Do one of the following:
Click History to revert any changes that you have made.
Click Live.
Click Push Live.
You can change the relative contributions of your individual Ranking Rules, and the contribution of Ranking to the final search results.
When Ranking is not defined, the search results are 100% on the Natural Relevance side of the Rules & Relevance slider bar on the Adjust Ranking Weights page. This balance simply means that the search results are ordered based solely on search terms.
When Ranking is defined, the associated Rank metadata field is assigned a Relevance value, ranging from 1-10. A value of 1 means that the calculated Rank makes up 10% of the search result ordering, and Natural Relevance the remaining 90%.
If you have more than one Rule defined in a Rule group, each Rule’s Weight value determines how much that Rule’s result contributes to the total calculated Rank. For example, suppose you have a Natural Relevance of 80%, meaning that the associated Rank field’s relevance is 2. You also have defined two Rules: one with a weight of 3, and the second with a weight of 7. In such case, the first Rule’s contribution to the final result is 6% ((3 / (3+7)) * 20%). The second Rule’s contribution to the final result is 14% ((7 / (3+7)) * 20%).
To adjust the weight associated with ranking rules
On the product menu, click Rules > Ranking Rules > Adjust Weights.
On the Adjust Ranking Weights page, in the Select Rule Group drop-down list, select a group whose ranking weights you want to adjust.
Drag the sliders to change the corresponding contribution values.
The pie chart reflects your changes graphically.
Click Save Changes.
Rebuild your staged website index to preview the results of the rule addition.
See Running a full index of a live or staged website….
See Running an incremental index of a live or staged website….
(Optional) Do one of the following:
Click Live.
Click Push Live.