fix: VLM semantic search chunk_id parsing (off-by-one error)
This commit is contained in:
+2
-1
@@ -152,8 +152,9 @@ async fn enrich_vlm_from_pg(
|
||||
qdrant_score: f32,
|
||||
) -> Option<SearchResult> {
|
||||
// Extract trace_id from chunk_id format: "{file_uuid}_t{trace_id_hex}"
|
||||
// file_uuid is 32 chars, then "_t" (2 chars), then hex trace_id
|
||||
let trace_id: i32 = if chunk_id.len() > 34 && chunk_id.starts_with(file_uuid) {
|
||||
let hex_part = &chunk_id[33..]; // after "{file_uuid}_t"
|
||||
let hex_part = &chunk_id[34..]; // after "{file_uuid}_t"
|
||||
i32::from_str_radix(hex_part, 16).ok()?
|
||||
} else {
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user