Logical operators :: Kloudfuse Docs
Logical operators
FuseQL logical operators combine two or more search filter expressions into a single compound condition. They must appear before the first pipe (|) in a query. The and operator requires both conditions to match; the or operator matches if either condition is true. Parentheses control evaluation order when mixing and and or.
and
Intersection operator (AND logic) between two search filter conditions. Selects only log lines that satisfy both conditions simultaneously. In regular search, AND is implied by writing two conditions side by side; in advanced search, write the keyword and explicitly.
Syntax
Regular search
Advanced search
label1="value1" label2="value2"
```
```none
@facet1="value1" and @facet2="value2"
```
### Parameters
| Parameter | Required | Description |
|--------------------|----------|--------------------------------------------------------------------------|
| left condition | Yes | A search filter expression on a label, facet, or term. |
| right condition | Yes | A second search filter expression that must also match. |
### Example
Filter nginx logs to show only `info`-level entries from a specific source.
```none
source="nginx" level="info"
Effect
Returns only log lines where both the source label equals nginx and the level label equals info.
In regular search, placing two conditions next to each other is equivalent to AND — no keyword is needed. In advanced search mode (prefix @ for facets), use the explicit and keyword to combine conditions. Parentheses can be used to group compound expressions: (source="nginx" and level="info") or source="nginx-error". |
or
Union operator (OR logic) between two search filter conditions. Selects log lines that satisfy at least one of the conditions. In regular search, express OR using a quoted OR inside a field value; in advanced search, write the keyword or between two full expressions.
Syntax
Regular search
Advanced search
label="valueA OR valueB"
```
```none
@facet="valueA" or @facet="valueB"
```
### Parameters
| Parameter | Required | Description |
|--------------------|----------|--------------------------------------------------------------------------|
| left condition | Yes | A search filter expression on a label, facet, or term. |
| right condition | Yes | A second search filter expression; at least one must match. |
### Example
Return log lines where the level is either `info` or `warning`.
```none
level="info OR warning"
Effect
Returns all log lines where level equals info or warning.
In regular search, the OR keyword must appear inside the quoted value string. In advanced search, use lowercase or between two @facet expressions: @level="info" or @level="warning". Use parentheses to control precedence when combining or with and. |