GithubHelp home page GithubHelp logo

Comments (7)

zhangjiayin avatar zhangjiayin commented on June 2, 2024

I just follow this guide http://my.oschina.net/xiaohui249/blog/214505 use elasticseaerch2.1.1 and got the error above

from elasticsearch-analysis-pinyin.

medcl avatar medcl commented on June 2, 2024

@zhangjiayin 没有问题的,请问你是在哪一个步骤报错的?

from elasticsearch-analysis-pinyin.

zhangjiayin avatar zhangjiayin commented on June 2, 2024

可能是 "tokenizer" : ["my_pinyin"], 我修改成 "tokenizer" : "sr_pinyin"就好了。

from elasticsearch-analysis-pinyin.

zhangjiayin avatar zhangjiayin commented on June 2, 2024

另外我的结果 好像有些奇怪
curl 'http://xxxx:9200/xxxxxxx/_analyze?text=%e5%88%98%e5%be%b7%e5%8d%8e&analyzer=pinyin_analyzer&pretty'
{
"tokens" : [ {
"token" : "l",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 0
}, {
"token" : "li",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 0
}, {
"token" : "i",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 0
}, {
"token" : "iu",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 0
}, {
"token" : "u",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 0
}, {
"token" : "d",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 1
}, {
"token" : "de",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 1
}, {
"token" : "e",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 1
}, {
"token" : "h",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 2
}, {
"token" : "hu",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 2
}, {
"token" : "u",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 2
}, {
"token" : "ua",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 2
}, {
"token" : "a",
"start_offset" : 0,
"end_offset" : 3,
"type" : "word",
"position" : 2
} ]
}

from elasticsearch-analysis-pinyin.

medcl avatar medcl commented on June 2, 2024

你用了 ngram filter吧

from elasticsearch-analysis-pinyin.

zplzpl avatar zplzpl commented on June 2, 2024

事实上,例子也加入了filter:NGram

from elasticsearch-analysis-pinyin.

medcl avatar medcl commented on June 2, 2024

太旧了,关闭了,有问题重新开

from elasticsearch-analysis-pinyin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.