Skip to main content

Crate nodedb_query

Crate nodedb_query 

Source
Expand description

Shared query-execution utilities used by every engine: BM25 scoring, text analysis (tokenization / normalization / stop words), expression evaluation helpers, MessagePack scan readers, and rank-fusion (RRF).

This crate is consumed by nodedb (server), nodedb-lite (embedded), and nodedb-fts (full-text overlay). Functions are pure / Send + Sync and free of I/O — actual data fetch happens in the calling crate.

Re-exports§

pub use chunk_text::ChunkError;
pub use chunk_text::ChunkStrategy;
pub use chunk_text::TextChunk;
pub use chunk_text::chunk_text;
pub use expr::BinaryOp;
pub use expr::CastType;
pub use expr::ComputedColumn;
pub use expr::EvalError;
pub use expr::SqlExpr;
pub use fusion::DEFAULT_RRF_K;
pub use fusion::FusedResult;
pub use fusion::RankedResult;
pub use fusion::reciprocal_rank_fusion;
pub use fusion::reciprocal_rank_fusion_linear;
pub use fusion::reciprocal_rank_fusion_weighted;
pub use json_expr::compare_json;
pub use json_expr::eval_expr_on_json;
pub use numeric_sum::ExactSum;
pub use partition_hash::partition_hash;
pub use partition_hash::partition_hash_seeded;
pub use scan_filter::ScanFilter;
pub use window::FrameBound;
pub use window::WindowError;
pub use window::WindowFrame;
pub use window::WindowFuncSpec;
pub use window::evaluate_window_functions;
pub use window::evaluate_window_functions_value;

Modules§

agg_key
Canonical aggregate key generation.
cast
CAST evaluation for SqlExpr.
chunk_text
CHUNK_TEXT(text, chunk_size, overlap, strategy) — deterministic text splitting.
expr
SqlExpr AST, on-wire codec, and row-scope evaluator.
expr_parse
functions
Scalar function evaluation for SqlExpr.
fusion
geo_functions
Geospatial SQL function evaluation, driven by a shared catalog.
json_expr
Expression evaluation against a JSON row.
json_ops
Shared JSON value operations: comparison, coercion, truthiness.
metadata_filter
Evaluation of MetadataFilter (nodedb-types) against a document.
msgpack_scan
Zero-deserialization binary scanner for MessagePack documents.
numeric_cmp
Numeric readings and their total order, shared by every comparison path.
numeric_sum
Exact SUM / AVG accumulation, shared by every aggregate path.
partition_hash
Stable, fixed-seed partition hash over a MessagePack row’s join-key bytes.
scan_filter
Post-scan filter evaluation.
simd_agg
SIMD-accelerated aggregation kernels for timeseries f64 columns.
simd_agg_i64
SIMD-accelerated aggregation kernels for i64 columns.
simd_filter
SIMD-accelerated filter kernels returning u64 bitmasks.
text_search
Full-text search re-exports from nodedb-fts.
ts_functions
Timeseries SQL function kernels.
value_ops
Core value operations on nodedb_types::Value: comparison, coercion, truthiness.
window
Window function specification and evaluation.