Broker 10.5 | webMethods Broker Documentation | Administering webMethods Broker | Managing Cluster Gateways | Filtering Documents across a Cluster Gateway | Filtering Documents
 
Filtering Documents
Suppose that a document contains a person's age and name of the state he lives in. The first document field has the label age and the second document field has the label state. The following filter string matches only those documents whose age field value is greater than 65 and whose state field value is equal to FL.
age > 65 and state = "FL"
In this example filter string, age and state represent document fields. This filter also contains an arithmetic constant, 65, and a string constant, "FL". The boolean operator and combines the field criterion for age and state.
Some additional examples of filter specifications are as follows:
debt > salary*0.50
>packaging = "portable" and price > 5000
>answer = 'Y' or answer = 'y'
>(answer = 'Y') or (answer = 'Y')
Filter strings can:
*Compare document field contents against constants and computed values.
*Combine document field comparisons using the boolean operators and, or and not.
*Perform arithmetic operations on document fields and constants.
*Contain regular expressions.
*Contain string and arithmetic constants.
*Contain a hint that specifies how documents should be processed.
For information about using regular expressions, hints, and filter functions from the webMethods Broker library, see the webMethods Broker Client Java API Programmer’s Guide.