global: reorg fixes + clients improved

This commit is contained in:
nym21
2026-01-28 23:35:51 +01:00
parent fecaf0f400
commit 6709ded66c
55 changed files with 4312 additions and 83 deletions
+4 -2
View File
@@ -156,6 +156,7 @@ impl Query {
Ok(ResolvedQuery {
vecs,
format: params.format(),
index: params.index,
version,
total,
start,
@@ -170,6 +171,7 @@ impl Query {
let ResolvedQuery {
vecs,
format,
index,
version,
total,
start,
@@ -182,7 +184,7 @@ impl Query {
Format::JSON => {
if vecs.len() == 1 {
let mut buf = Vec::new();
MetricData::serialize(vecs[0], start, end, &mut buf)?;
MetricData::serialize(vecs[0], index, start, end, &mut buf)?;
Output::Json(buf)
} else {
let mut buf = Vec::new();
@@ -191,7 +193,7 @@ impl Query {
if i > 0 {
buf.push(b',');
}
MetricData::serialize(*vec, start, end, &mut buf)?;
MetricData::serialize(*vec, index, start, end, &mut buf)?;
}
buf.push(b']');
Output::Json(buf)
+2 -1
View File
@@ -1,4 +1,4 @@
use brk_types::{Etag, Format};
use brk_types::{Etag, Format, Index};
use vecdb::AnyExportableVec;
/// A resolved metric query ready for formatting.
@@ -6,6 +6,7 @@ use vecdb::AnyExportableVec;
pub struct ResolvedQuery {
pub(crate) vecs: Vec<&'static dyn AnyExportableVec>,
pub(crate) format: Format,
pub(crate) index: Index,
pub(crate) version: u64,
pub(crate) total: usize,
pub(crate) start: usize,