The previous sections described query constraint expressions which could represent arbitrarily complex Boolean expressions of metadata constraints, including document sets, properties and URL constraints. In some circumstances, a hard constraint is not appropriate, and a preference for certain content is desired. For example, to support personalization, an application might prefer certain content depending on the user’s profile.

ATG Search supports this functionality by allowing a second expression to be included in the request XML. This second expression includes weights which will affect the relevancy calculation of the results. Results that satisfy the expression receive extra weight, and results that don’t receive no extra weight.

The metadata expressions use the same XML format as the query constraints, except that each basic element requires a weight attribute, such as:

<set subdirs="bool" weight="N"
<strprop name="name" weight="N"

The N value is arbitrary and will be relative to the maximum weight for any given expression. The three Boolean expressions do not use the weight attribute, for their weight is based on the weight of their operands, as follows:

Thus, the entire metadata expression results in a total weight using the mathematical combination of the individual weights. This total weight is normalized into a relevancy value and factored into total relevancy.

loading table of contents...