Manually editing queries

The rules that you build in the Rule conditions area of the Rule Builder tab are displayed in the analytics rule definition language (RDL) in the Rule query area. When you become familiar with the syntax of rule definition language, you can directly edit the queries.

Note:

When you have manually edited a query and saved it, you can no longer use the visual query builder to edit the same rule.

RDL lets you create rules that are not possible in the visual rule builder. For example, you can use parentheses to set Boolean precedence in your rules. Consider a case in which you want to mark or tag the items that match these conditions:

To match these items, one user might use the visual rule builder and construct the following rule:

Author CONTAINS '"John Doe"'
OR
To CONTAINS '"Jane Smith"'
AND
Subject CONTAINS 'Symantec'

However, another user might construct the rule differently, and produce this result:

To CONTAINS '"Jane Smith"'
AND
Subject CONTAINS 'Symantec'
OR
Author CONTAINS '"John Doe"'

In both cases, it is unclear what results are produced when the rule engine processes the rules. To ensure that your rules produce the results that you want, write them directly in RDL and use parentheses to group the conditions that belong together. The parentheses ensure that related conditions are evaluated as you intend, and it is clear what your intentions are. For example:

(
Author CONTAINS '"John Doe"'
OR
To CONTAINS '"Jane Smith"'
)
AND
Subject CONTAINS 'Symantec'

You can use stemming when you search the Subject, Content or SubjectOrContent attributes. Use the following syntax:

attribute {STEM} operator value

Note:

You cannot use wildcard characters in rule conditions that use stemming.

Any phrase values that you add to your searches should be enclosed in double quotation marks. For example:

subject contains "the purchase order"

In RDL, complex search values must be enclosed in double quotation marks. For example:

SubjectOrContent AllOf
'
  "the purchase order"
  Stock Investment
'

In this case, the query matches the items that contain "the purchase order", "stock", and "investment" in the subject or body.

More Information

About analytics rules

Creating analytics rules

Changing the priority levels of marking rules

About tagging rules

About the search attributes

About the Discovery Accelerator permissions