1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//
// Unified Query Algebra
//
// Copyright (c) 2023-2026 Cognica, Inc.
//
//! Runtime-independent retrieval configuration shared by logical and physical plans.
#[derive(Clone, Debug)]
pub enum GatingSpec {
/// Lucene-compatible softplus gating.
Softplus,
/// Raw signal score scales the fused logit.
Pass,
/// Sigmoid gating with the named feature.
Sigmoid { feature: String },
/// `ReLU` gate.
ReLU,
/// Swish gate.
Swish,
/// GELU gate.
Gelu,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ExternalPriorMode {
Authority,
Recency,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum MultiStageCutoff {
/// Top-K results -- final cardinality is `k`.
TopK(usize),
/// Fractional cutoff -- final cardinality is `n * ratio`.
Ratio(f64),
}
#[derive(Clone, Debug, Default)]
pub struct TemporalFilterIR {
pub timestamp: Option<f64>,
pub time_range: Option<(f64, f64)>,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum Direction {
Out,
In,
Both,
}