Skip to content

Commit 2240e4f

Browse files
committed
Implement Typesense
1 parent bcf4688 commit 2240e4f

File tree

5 files changed

+800
-0
lines changed

5 files changed

+800
-0
lines changed

apps/labrinth/src/env.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,10 @@ vars! {
150150
ELASTICSEARCH_USERNAME: String = "";
151151
ELASTICSEARCH_PASSWORD: String = "";
152152
ELASTICSEARCH_INDEX_CHUNK_SIZE: i64 = 5000i64;
153+
TYPESENSE_URL: String = "http://localhost:8108";
154+
TYPESENSE_API_KEY: String = "modrinth";
155+
TYPESENSE_INDEX_PREFIX: String = "labrinth";
156+
TYPESENSE_INDEX_CHUNK_SIZE: i64 = 5000i64;
153157

154158
// storage
155159
STORAGE_BACKEND: crate::file_hosting::FileHostKind;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
mod common;
22
pub mod elasticsearch;
33
pub mod meilisearch;
4+
pub mod typesense;
45

56
pub use common::{
67
ParsedSearchRequest, SearchIndex, SearchIndexName, SearchSort,
78
combined_search_filters, parse_search_index, parse_search_request,
89
};
910
pub use elasticsearch::Elasticsearch;
1011
pub use meilisearch::{Meilisearch, MeilisearchConfig};
12+
pub use typesense::{Typesense, TypesenseConfig};

0 commit comments

Comments
 (0)