Comparison operators
FuseQL comparison operators filter log lines by testing label and facet values against a literal. They must appear before the first pipe (|) in a query and are evaluated against the inverted index — no raw log body scanning is required. To combine multiple filter conditions, use the logical operators and and or.
=
Exact-match filter operator. Selects log lines where a label or facet equals the specified value exactly. Use label= for Kubernetes/infrastructure labels and @facet= for indexed log fields in advanced search mode.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Yes |
The label key or (with |
|
Yes |
The exact string value the field must equal. |
Example
Select nginx access logs from a specific Kubernetes namespace.
source="nginx" and kube_namespace="kfuse"
Returns only log lines where source equals nginx and kube_namespace equals kfuse.
|
The |
>=
Numeric comparison filter operator. Selects log lines where a numeric facet value is greater than or equal to the specified number. The boundary value is included. Applies only to numeric facets.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Yes |
A numeric facet name, prefixed with |
|
Yes |
The inclusive lower bound; values equal to or greater than this are returned. |
Example
Return nginx logs where the HTTP status code indicates a successful or redirect response (status >= 200).
source="nginx" and @http_status>=200
Returns log lines from the nginx source where http_status is 200 or higher, including 2xx, 3xx, 4xx, and 5xx responses.
|
Use |
>
Numeric comparison filter operator. Selects log lines where a numeric facet value is strictly greater than the specified number. Applies only to numeric facets; string comparisons are not supported by this operator.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Yes |
A numeric facet name, prefixed with |
|
Yes |
The numeric threshold; only values strictly greater than this are returned. |
Example
Return nginx logs where the HTTP status code indicates a server error (status > 499).
source="nginx" and @http_status>499
Returns log lines from the nginx source where the http_status facet value is 500 or higher.
|
Numeric comparison operators ( |
<=
Numeric comparison filter operator. Selects log lines where a numeric facet value is less than or equal to the specified number. The boundary value is included. Applies only to numeric facets.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Yes |
A numeric facet name, prefixed with |
|
Yes |
The inclusive upper bound; values equal to or less than this are returned. |
Example
Return nginx logs for requests that did not return a server error (status code 499 or below).
source="nginx" and @http_status<=499
Returns log lines from the nginx source where http_status is 499 or lower, covering 1xx, 2xx, 3xx, and 4xx responses.
|
Use |
<
Numeric comparison filter operator. Selects log lines where a numeric facet value is strictly less than the specified number. The boundary value is excluded. Applies only to numeric facets.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Yes |
A numeric facet name, prefixed with |
|
Yes |
The exclusive upper bound; only values strictly below this are returned. |
Example
Return nginx logs for requests that completed quickly (response time less than 100 ms).
source="nginx" and @duration_ms<100
Returns log lines from the nginx source where the duration_ms facet is below 100 milliseconds.
|
Use |
!=
Exact-exclusion filter operator. Selects log lines where a label or facet does not equal the specified value. The match is case-sensitive. Use this to exclude a specific value while keeping everything else.
Parameters
| Parameter | Required | Description |
|---|---|---|
|
Yes |
The label key or (with |
|
Yes |
The exact string value the field must not equal. |
Example
Return all nginx logs except those at the info level.
source="nginx" and level!="info"
Returns log lines from the nginx source where the level is anything other than info (for example, warning, error, or debug).
|
|