Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update faq.md #10

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion faq/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ Planned, see [#478](https://github.com/provectus/kafka-ui/issues/478)

### Smart filters syntax

To use smart filters you have to enable groovy filters. To do so just add filtering.groovy.enabled=true in the [configuration](https://docs.kafka-ui.provectus.io/configuration/configuration-file).

**Variables bound to groovy context**: partition, timestampMs, keyAsText, valueAsText, header, key (json if possible), value (json if possible).

**JSON parsing logic**:
Expand All @@ -36,7 +38,7 @@ Key and Value (if they can be parsed to JSON) they are bound as JSON objects, ot

1. `keyAsText != null && keyAsText ~"([Gg])roovy"` - regex for key as a string
2. `value.name == "iS.ListItemax" && value.age > 30` - in case value is json
3. `value == null && valueAsText != null` - search for values that are not nulls and are not json
3. `value != null && valueAsText != null` - search for values that are not nulls and are not json
4. `headers.sentBy == "some system" && headers["sentAt"] == "2020-01-01"`
5. multiline filters are also allowed:

Expand Down