search.go 374 B

123456789101112131415161718
  1. package search
  2. import (
  3. "github.com/huichen/wukong/engine"
  4. "github.com/huichen/wukong/types"
  5. )
  6. var searcher engine.Engine
  7. func init() {
  8. searcher.Init(types.EngineInitOptions{
  9. SegmenterDictionaries: "data/dictionary.txt",
  10. StopTokenFile: "data/stop_tokens.txt",
  11. IndexerInitOptions: &types.IndexerInitOptions{
  12. IndexType: types.LocationsIndex,
  13. },
  14. })
  15. }