File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1313 },
1414 "dependencies" : {
1515 "@orama/orama" : " ^3.1.18" ,
16+ "@orama/stopwords" : " ^3.1.18" ,
17+ "@orama/tokenizers" : " ^3.1.18" ,
1618 "@radix-ui/react-accordion" : " ^1.2.17" ,
1719 "class-variance-authority" : " ^0.7.1" ,
1820 "fumadocs-core" : " ^16.11.5" ,
Original file line number Diff line number Diff line change 1+ import { stopwords as mandarinStopwords } from '@orama/stopwords/mandarin' ;
2+ import { createTokenizer } from '@orama/tokenizers/mandarin' ;
13import { createFromSource } from 'fumadocs-core/search/server' ;
24
35import { source } from '@/lib/source' ;
46
57export const revalidate = false ;
68
79export const { staticGET : GET } = createFromSource ( source , {
8- // https://docs.orama.com/docs/orama-js/supported-languages
9- language : 'english' ,
10+ components : {
11+ tokenizer : createTokenizer ( {
12+ language : 'mandarin' ,
13+ stopWords : mandarinStopwords ,
14+ } ) ,
15+ } ,
1016} ) ;
Original file line number Diff line number Diff line change 11'use client' ;
22import { create } from '@orama/orama' ;
3+ import { stopwords as mandarinStopwords } from '@orama/stopwords/mandarin' ;
4+ import { createTokenizer } from '@orama/tokenizers/mandarin' ;
35import { useDocsSearch } from 'fumadocs-core/search/client' ;
46import {
57 SearchDialog ,
@@ -17,8 +19,12 @@ import { useI18n } from 'fumadocs-ui/contexts/i18n';
1719function initOrama ( ) {
1820 return create ( {
1921 schema : { _ : 'string' } ,
20- // https://docs.orama.com/docs/orama-js/supported-languages
21- language : 'english' ,
22+ components : {
23+ tokenizer : createTokenizer ( {
24+ language : 'mandarin' ,
25+ stopWords : mandarinStopwords ,
26+ } ) ,
27+ } ,
2228 } ) ;
2329}
2430
You can’t perform that action at this time.
0 commit comments