Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 17 additions & 20 deletions apps/labrinth/src/search/backend/typesense/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,28 +114,25 @@ impl Default for RequestConfig {
}

fn default_query_by() -> Vec<String> {
// [
// "name",
// "indexed_name",
// "slug",
// "author",
// "indexed_author",
// "summary",
// ]
["name", "indexed_name", "slug", "author", "indexed_author"]
.into_iter()
.map(str::to_string)
.collect()
[
"name",
"indexed_name",
"slug",
"author",
"indexed_author",
"summary",
]
.into_iter()
.map(str::to_string)
.collect()
}

fn default_query_by_weights() -> Vec<u8> {
// vec![15, 15, 10, 3, 3, 1]
vec![15, 15, 10, 3, 3]
vec![15, 15, 10, 3, 3, 1]
}

fn default_prefix() -> Vec<bool> {
// vec![true, true, true, true, true, true]
vec![true, true, true, true, true]
vec![true, true, true, true, true, true]
}

const fn default_prioritize_exact_match() -> bool {
Expand All @@ -147,13 +144,13 @@ const fn default_prioritize_num_matching_fields() -> bool {
}

const fn default_prioritize_token_positions() -> bool {
// true
false
true
// false
}

const fn default_drop_tokens_threshold() -> usize {
// 0
1
0
// 1
}

const fn default_max_candidates() -> usize {
Expand Down
Loading