Skip to content
Merged
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
14 changes: 13 additions & 1 deletion src/StructuredLogger/Search/NodeQueryMatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -796,11 +796,23 @@ public SearchResult IsMatch(params string[] fields)

public bool IsTimeIntervalMatch(BaseNode node)
{
if (!HasTimeIntervalConstraints || node is not TimedNode timedNode)
if (!HasTimeIntervalConstraints)
{
return true;
}

// Messages and Folders are not timed nodes, using the parent instead.
if (node is not TimedNode timedNode)
{
var parentNode = node.GetNearestParent<TimedNode>();
if (parentNode is null)
{
return true;
}

timedNode = parentNode;
}

if (StartBefore != default && timedNode.StartTime > StartBefore)
{
return false;
Expand Down