Re-enable summary weight in search (#5871)

* re-enable summary weighting in search

* prioritize tokens/drop tokens thresh
This commit is contained in:
aecsocket
2026-05-12 13:14:45 +01:00
committed by GitHub
parent a4f3c63fcc
commit 1ddbae40b7

View File

@@ -109,28 +109,25 @@ impl Default for RequestConfig {
} }
fn default_query_by() -> Vec<String> { fn default_query_by() -> Vec<String> {
// [ [
// "name", "name",
// "indexed_name", "indexed_name",
// "slug", "slug",
// "author", "author",
// "indexed_author", "indexed_author",
// "summary", "summary",
// ] ]
["name", "indexed_name", "slug", "author", "indexed_author"] .into_iter()
.into_iter() .map(str::to_string)
.map(str::to_string) .collect()
.collect()
} }
fn default_query_by_weights() -> Vec<u8> { fn default_query_by_weights() -> Vec<u8> {
// vec![15, 15, 10, 3, 3, 1] vec![15, 15, 10, 3, 3, 1]
vec![15, 15, 10, 3, 3]
} }
fn default_prefix() -> Vec<bool> { fn default_prefix() -> Vec<bool> {
// vec![true, true, true, true, true, true] vec![true, true, true, true, true, true]
vec![true, true, true, true, true]
} }
const fn default_prioritize_exact_match() -> bool { const fn default_prioritize_exact_match() -> bool {
@@ -142,13 +139,13 @@ const fn default_prioritize_num_matching_fields() -> bool {
} }
const fn default_prioritize_token_positions() -> bool { const fn default_prioritize_token_positions() -> bool {
// true true
false // false
} }
const fn default_drop_tokens_threshold() -> usize { const fn default_drop_tokens_threshold() -> usize {
// 0 0
1 // 1
} }
const fn default_max_candidates() -> usize { const fn default_max_candidates() -> usize {