mirror of
https://github.com/mindoc-org/mindoc.git
synced 2026-02-27 17:03:57 +08:00
搭建框架
This commit is contained in:
18
search/search.go
Normal file
18
search/search.go
Normal file
@@ -0,0 +1,18 @@
|
||||
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,
|
||||
},
|
||||
})
|
||||
}
|
||||
Reference in New Issue
Block a user