wangbin / jiebago

Jieba 分词 Go 语言版
492 stars 114 forks source link

example_bleve_test.go提示no analyzer type 'custom' registered #1

Open darren opened 8 years ago

darren commented 8 years ago

需要倒入github.com/blevesearch/bleve/analysis/analyzers/custom_analyzer 在这里记录一下

yourhe commented 8 years ago

需要 go get github.com/blevesearch/bleve

xpbliss commented 6 years ago

出现的错误提示同标题。no analyzer with name or type 'custom' registered

但没有github.com/blevesearch/bleve/analysis/analyzers/custom_analyzer,有的只是github.com/blevesearch/bleve/analysis/analyzers/custom

另外,已经 go get github.com/blevesearch/bleve

xpbliss commented 6 years ago

@Darren

darren commented 6 years ago

导入 github.com/blevesearch/bleve/analysis/analyzers/custom 不行吗?

diff --git a/tokenizers/example_bleve_test.go b/tokenizers/example_bleve_test.go
index f5da6b4..ccec9f7 100644
--- a/tokenizers/example_bleve_test.go
+++ b/tokenizers/example_bleve_test.go
@@ -6,6 +6,7 @@ import (
        "os"

        "github.com/blevesearch/bleve"
+       _ "github.com/blevesearch/bleve/analysis/analyzer/custom"
        _ "github.com/wangbin/jiebago/tokenizers"
 )
xpbliss commented 6 years ago

Ok,thanks!