x-pack/platform/packages/shared/kbn-dissect-heuristics/README.md
Utilities and helper functions for extracting Dissect patterns from log messages.
This package provides an algorithm to automatically generate Elasticsearch Dissect processor patterns by analyzing sample log messages. Unlike Grok patterns which use regular expressions, Dissect patterns use simple literal string delimiters for faster parsing of structured logs.
The extraction algorithm supports a subset of Dissect modifiers:
->): Handles variable trailing whitespace?): Skips fields with non-meaningful constant values{}): Anonymous skip fieldsNote: Reference keys (* and &) and append modifiers (+) are not supported by this implementation.
The current approach keeps delimiter scoring deliberately simple:
), ], } is discarded unless its matching opener (, [, { was also selected. This avoids generating patterns that fragment bracketed content using an orphan closer.No additional bracket penalties (mismatch, crossing, depth variance, ordering instability) are applied—favoring simpler, more predictable behavior while still preventing obviously broken delimiter choices.