fix: replaced several instances if cloning, reduced allocations

This commit is contained in:
Per Stark
2026-06-06 19:45:18 +02:00
parent 93c65970f1
commit 676fdbc132
12 changed files with 254 additions and 110 deletions
+3 -1
View File
@@ -5,6 +5,8 @@ pub mod query;
pub mod reranking;
pub mod scoring;
use std::sync::Arc;
use common::{
error::AppError,
storage::{
@@ -52,7 +54,7 @@ pub struct RetrievedChunk {
pub struct RetrievedEntity {
pub entity: KnowledgeEntity,
pub score: f32,
pub chunks: Vec<RetrievedChunk>,
pub chunks: Arc<Vec<RetrievedChunk>>,
}
/// Run chunk-first hybrid retrieval for `input_text`, optionally resolving owning entities.