yanyiwu / gojieba

"结巴"中文分词的Golang版本
MIT License
2.4k stars 302 forks source link

bleve下查找能否更精确一些? #33

Open xpbliss opened 6 years ago

xpbliss commented 6 years ago

例如:

req := bleve.NewSearchRequest(bleve.NewQueryStringQuery("财务管理办法"))
        req.Highlight = bleve.NewHighlight()
        res, err := index.Search(req)
        if err != nil {
            panic(err)
        }
        fmt.Println(res)

结果中,只要有财务、管理、办法的都查找出来了,能否精确一些,只找"财务管理办法"?

xiaomi-tc commented 5 years ago

用 bleve.NewMatchPhraseQuery("财务管理法")
如果不行,analyzer 就不用 gojieba, 直接用 standard

github-actions[bot] commented 1 week ago

This issue has not been updated for over 5 years and will be marked as stale. If the issue still exists, please comment or update the issue, otherwise it will be closed after 7 days.