Using filters in content-based filtering
Content based filters are specified as ESQL expressions.
Field references
The field references that can be used in filters for content based filtering form a subset of those supported by the Filter node. As with the Filter node, to reference a field in a filter, you must specify a path. Each element of the path consists of a, possibly indexed, field name.
The syntax of a field reference is shown above, where field
name and Correlation Name are identifiers.
These identifiers represent all messages as a hierarchical syntax
element tree. Each path identifies a route through that tree, which
leads to a particular syntax element, starting from one of the predefined
correlation names that refer to fixed points that every message has.
The following correlation names are supported for content based filtering:
| Correlation name | Purpose |
|---|---|
| Root | Identifies the root of a published message. |
| Properties | Identifies the portion of the message in which the standard properties of a message lie. |
| Body | Identifies the last child of the root of the message, which is usually, but not always, the application data that follows any headers. |
Here are some examples of field references, together with their meanings:
| Field reference | Purpose |
|---|---|
| Body.Person.Address | Refers to the first Address field in the Person entity in the body of the message. |
| Properties.Topic | Refers to the "Topic" field in the standard properties of a message. |
| Root.MQMD.UserIdentifier | Refers to the UserIdentifier field
in the MQMD of the message. |
Note that path elements of "*" and the array index "LAST" are
not supported in the filters.
