Skip to content

docs/victorialogs/logsql.md: document OR syntax in the _stream filter#1373

Open
vadimalekseev wants to merge 1 commit into
masterfrom
stream-or-operator-docs
Open

docs/victorialogs/logsql.md: document OR syntax in the _stream filter#1373
vadimalekseev wants to merge 1 commit into
masterfrom
stream-or-operator-docs

Conversation

@vadimalekseev
Copy link
Copy Markdown
Member

@vadimalekseev vadimalekseev commented May 1, 2026

Documents how AND and OR logic works inside stream filters, including operator precedence and usage with the in operators.

Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@vadimalekseev vadimalekseev requested review from func25 and valyala May 1, 2026 13:09
Comment on lines +567 to +571
Multiple conditions inside `{...}` are combined with `and` logic by default - a log entry must match all of them:

```logsql
{app="nginx",env="prod"}
```
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you clarify that AND conditions inside stream filters are written as comma-separated conditions, not with the and keyword, to avoid ambiguity?

I think we should avoid writing and in inline code and use "AND condition" or comma-separated condition instead. It may be clearer to say both "AND condition" and "OR condition" in plain text.

Btw, I don't know the reason for not supporting the and keyword in stream filters. The error message is also incorrect:

return nil, fmt.Errorf("unexpected token %q in _stream filter after %q; want 'or', 'and', '}' or ','", lex.token, f)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants