Conditional statements
You can surround one or more stages in a processing pipeline with a conditional statement. When you do this, documents that meet the condition are sent through to the stages within the statement. All other documents bypass the conditional statement entirely.
You can nest conditional statements within other conditional statements, up to four levels deep.
This conditional statement allows certain documents to pass through to the Drop Documents stage. Documents that do not meet this criteria bypass the Drop Documents stage and continue on to the next stage in the pipeline.

For information, see Adding conditional statements to a pipeline.
Each rule contains:
- The name of a field or stream that appears in a document.
- A comparator, the method by which the system should compare the field or value you specify against the fields or values in documents passing through the pipeline.
The value part of the conditional statement can be used to reference the value of a field using the ${field} syntax. For example, if you were to compare field1 to field2, the conditional will look like field1 greater_than ${field2}.
- A value for the metadata field. Some comparators, such as is_null or field_exists, do not need a value specified.
If you are using the in_list or not_in_list comparators, specify a comma-separated list of values
Comparator | Negative version | Description |
equals | not_equal |
Verifies whether a document's value for a field is equal to the value you specified. For example, a document with the field value pair softwareVersion: 2.0satisfies the conditional statement if softwareVersion equals 2. Both the equals and not_equal comparators are case sensitive. The values compared must be of compatible types. For example, a document failure occurs if this comparator tries to compare an integer (for example, 3) to a string (for example, three). |
lexically_equal | lexically_not_equal |
Verifies whether a document's value for a field is lexically equal to the value you specified. Two values are lexically equal if they share the same set of characters, in the same order, and with the same number of occurrences of each character. Both the lexically_equal and lexically_not_equal comparators are case sensitive. |
equals_ignore_case | not_equals_ignore_case | Same as lexically_equal and lexically_not_equal, except these comparators are not case sensitive. |
field_exists | field_does_not_exist | Verifies whether the specified field exists in a document. |
stream_exists | stream_does_not_exist | Verifies whether the specified content stream exists in a document. |
contains | not_contains |
Verifies whether the value you specify appears anywhere in the applicable document field value. For example, this conditional rule: HCI_display contains doc Will match any of these document field/value pairs: HCI_displayName: presentationNotes.doc HCI_displayName: presentationNotes.docx HCI_diaplayName: document2.txt Both the contains and not_contains comparators are case sensitive. |
contains_ignore_case | not_contains_ignore_case | Same as contains and not_contains, except these comparators are not case sensitive. |
in_list | not_in_list | Verifies whether a document's value for a field exactly matches any value in the list of values that you specified. With this comparator, you specify a comma-separated list of values. |
less_than | N/A |
For numerical values, verifies whether a document's value for a field is less than the value you specified. The values compared must be of compatible types. For example, a document failure occurs if this comparator tries to compare an integer (for example, 3) to a string (for example, three). |
lexically_less_than | N/A |
Verifies whether a document's value for a field is lexically less than the value you specified. For example, 20 is lexically less than 3 because the first character, 2, precedes 3 in numerical order. |
less_or_equals | N/A |
For numerical values, verifies whether a document's value for a field is less than or equal to the value you specified. The values compared must be of compatible types. For example, a document failure occurs if this comparator tries to compare an integer (for example, 3) to a string (for example, three). |
lexically_less_or_equals | N/A | Verifies whether a document's value for a field is lexically less than or equal to the value you specified. |
greater_than | N/A |
For numerical values, verifies whether a document's value for a field is greater than the value you specified. The values compared must be of compatible types. For example, a document failure occurs if this comparator tries to compare an integer (for example, 3) to a string (for example, three). |
lexically_greater_than | N/A |
Verifies whether a document's value for a field is lexically greater than the value you specified. For example, 3 is lexically greater than 20 because 3 precedes 2 in numerical order. |
greater_or_equals | N/A |
For numerical values, verifies whether a document's value for a field is greater than or equal to the value you specified. The values compared must be of compatible types. For example, a document failure occurs if this comparator tries to compare an integer (for example, 3) to a string (for example, three). |
lexically_greater_or_equals | N/A | Verifies whether a document's value for a field is lexically greater than or equal to the value you specified. |
begins_with | not_begins_with | Verifies whether a document's value for a field begins with the string of text you specify. |
ends_with | not_ends_with | Verifies whether a document's value for a field ends with the string of text you specify. |
is_empty | is_not_empty | Verifies whether the specified field is empty, that is, has no value. |
is_null | is_not_null | Verifies whether the specified field has a value of null. |
You can also use the ${NOW} field as a value when writing a conditional statement. This field compares an expression to a date and time relative to the execution of a pipeline using Solr date math syntax.
For example, the conditional statement "HCI_createTime greater_than ${NOW-1MONTH/DAY}" specifies a document that was created within the last month.
See the Solr date math documentation for proper syntax to use when writing an expression.
Supported date math operations are / (rounding), + (addition), and - (subtraction). Supported units of time are YEAR(S), MONTH(S), DAY(S), HOUR(S), MINUTE(S), and SECOND(S).