Skip to content

Commit 3b86faf

Browse files
Valery Petrovclaude
andcommitted
fix: keep raw protocol numbers in NetFlow bare-term search
The previous commit replaced the protocol number with its name in the default full-text expression, so a bare "17" stopped matching UDP flows. Search both the number and the name. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent d7b677c commit 3b86faf

2 files changed

Lines changed: 4 additions & 0 deletions

File tree

‎packages/common-utils/src/__tests__/netflowSource.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ it('searches mapped NetFlow dimensions for bare Lucene terms by default', () =>
8383
expect(config.implicitColumnExpression).toContain('toString(SrcAddr)');
8484
expect(config.implicitColumnExpression).toContain('toString(ExporterName)');
8585
expect(config.implicitColumnExpression).toContain('toString(OutIfName)');
86+
expect(config.implicitColumnExpression).toContain(
87+
"ifNull(toString(Proto), '')",
88+
);
8689
expect(config.implicitColumnExpression).toContain(
8790
netflowProtocolNameExpression('Proto'),
8891
);

‎packages/common-utils/src/core/searchChartConfig.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ function getNetflowImplicitColumnExpression(source: TNetflowSource): string {
6161
source.dstAddrExpression,
6262
source.srcPortExpression,
6363
source.dstPortExpression,
64+
protocol,
6465
protocol && netflowProtocolNameExpression(protocol),
6566
source.exporterExpression,
6667
source.inIfExpression,

0 commit comments

Comments
 (0)