fix(build): perbaiki referensi paket zesdex-gateway dan sinkronisasi versi nix

- Dockerfile & default.nix: ganti zesdex-backend -> zesdex-gateway (binary zesdex)
- flake.nix & default.nix: versi 1.13.0 -> 1.18.2
- Cargo.lock: sinkronkan versi workspace member (1.18.0 -> 1.18.2)
- perf(search): kurangi alokasi per-query di semantic search (Vec<String> -> Vec<&str>)
- chore(ci): drop cargo build release dari check job, tambah fmt check
- chore: tambah .dockerignore, perbaiki trailing newline .gitignore
This commit is contained in:
asepharyana
2026-08-27 21:50:35 +07:00
parent 448eb5d462
commit 6d3f4918bf
3 changed files with 39 additions and 16 deletions
@@ -346,10 +346,7 @@ impl SymbolIndex {
}
let query_lower = query.to_lowercase();
let query_words: Vec<String> = query_lower
.split_whitespace()
.map(|s| s.to_string())
.collect();
let query_words: Vec<&str> = query_lower.split_whitespace().collect();
let mut scored: Vec<(i32, &CodeSymbol)> = self
.symbols
@@ -424,7 +421,7 @@ impl Default for SymbolIndex {
}
/// Score a symbol against a search query.
fn score_symbol(sym: &CodeSymbol, query_lower: &str, query_words: &[String]) -> i32 {
fn score_symbol(sym: &CodeSymbol, query_lower: &str, query_words: &[&str]) -> i32 {
let name_lower = sym.name.to_lowercase();
let mut score: i32 = 0;