Fix Typesense tests (#5541)

* Fix Typesense tests

* fix

* add back author

* Split project title and authors by words and index on that

* clippy
This commit is contained in:
aecsocket
2026-03-13 13:34:51 +00:00
committed by GitHub
parent cc9059fb4a
commit 991b4d8c13
8 changed files with 66 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ use chrono::{DateTime, Utc};
use dashmap::DashMap;
use eyre::Result;
use futures::TryStreamExt;
use heck::ToKebabCase;
use itertools::Itertools;
use std::collections::HashMap;
use tracing::info;
@@ -426,6 +427,7 @@ pub async fn index_local(
project_id: crate::models::ids::ProjectId::from(project.id)
.to_string(),
name: project.name.clone(),
indexed_title: project.name.to_kebab_case(),
summary: project.summary.clone(),
categories: categories.clone(),
display_categories: display_categories.clone(),
@@ -434,6 +436,7 @@ pub async fn index_local(
log_downloads: (project.downloads.max(1) as f64).ln(),
icon_url: project.icon_url.clone(),
author: owner.clone(),
indexed_author: owner.to_kebab_case(),
date_created: project.approved,
created_timestamp: project.approved.timestamp(),
date_modified: project.updated,