搭建框架

This commit is contained in:
Minho
2017-04-21 18:20:35 +08:00
parent d58087f723
commit 67486f0866
727 changed files with 831224 additions and 37 deletions

18
search/search.go Normal file
View 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,
},
})
}