add other projects

This commit is contained in:
2025-11-04 15:00:49 -03:00
parent 80ff884ceb
commit 0b0ef528df
218 changed files with 58699 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
import { Meilisearch, type SearchResponse } from 'meilisearch'
export async function createSearch({
query,
filter = undefined,
index,
sort,
env
}: {
query?: string
filter?: string
index: string
sort: string[]
env: Env
}): Promise<SearchResponse> {
const host = env.MEILI_HOST
const apiKey = env.MEILI_API_KEY
const client = new Meilisearch({ host, apiKey })
const index_ = client.index(index)
return index_.search(query, {
sort,
filter,
limit: 100
})
}