mirror of
https://github.com/mindoc-org/mindoc.git
synced 2025-04-24 03:17:54 +08:00
18 lines
374 B
Go
18 lines
374 B
Go
![]() |
package search
|
||
|
|
||
|
import (
|
||
|
"github.com/huichen/wukong/engine"
|
||
|
"github.com/huichen/wukong/types"
|
||
|
)
|
||
|
|
||
|
var searcher engine.Engine
|
||
|
|
||
|
func init() {
|
||
|
searcher.Init(types.EngineInitOptions{
|
||
|
SegmenterDictionaries: "data/dictionary.txt",
|
||
|
StopTokenFile: "data/stop_tokens.txt",
|
||
|
IndexerInitOptions: &types.IndexerInitOptions{
|
||
|
IndexType: types.LocationsIndex,
|
||
|
},
|
||
|
})
|
||
|
}
|