mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-22 07:00:43 +08:00
18 lines
479 B
TypeScript
18 lines
479 B
TypeScript
import { stopwords as mandarinStopwords } from "@orama/stopwords/mandarin";
|
|
import { createTokenizer } from "@orama/tokenizers/mandarin";
|
|
import { createFromSource } from "fumadocs-core/search/server";
|
|
import { source } from "@/lib/source";
|
|
|
|
const server = createFromSource(source, {
|
|
components: {
|
|
tokenizer: createTokenizer({
|
|
language: "mandarin",
|
|
stopWords: mandarinStopwords,
|
|
}),
|
|
},
|
|
});
|
|
|
|
export async function loader() {
|
|
return server.staticGET();
|
|
}
|