GithubHelp home page GithubHelp logo

Comments (2)

medcl avatar medcl commented on June 2, 2024

里面用了ngram分词,然后两者的拼音都是l开头的,所以都会查出来

------------------ Original ------------------
From: "doabit"[email protected];
Date: Mon, Aug 20, 2012 10:04 AM
To: "medcl/elasticsearch-analysis-pinyin"[email protected];

Subject: [elasticsearch-analysis-pinyin] 查找的时候有点疑问 (#4)

到第三步时
curl -XPOST http://localhost:9200/medcl/folks/andy -d'{"name":"刘德华"}' curl -XPOST http://localhost:9200/medcl/folks/andy -d'{"name":"李小明"}'

然后
curl http://localhost:9200/medcl/folks/_search\?q\=name:%e5%88%98&pretty\=1 { "took" : 10, "timed_out" : false, "_shards" : { "total" : 5, "successful" : 5, "failed" : 0 }, "hits" : { "total" : 2, "max_score" : 2.8713017, "hits" : [ { "_index" : "medcl", "_type" : "folks", "_id" : "andy", "_score" : 2.8713017, "_source" : {"name":"刘德华"} }, { "_index" : "medcl", "_type" : "folks", "_id" : "andy2", "_score" : 0.89630747, "_source" : {"name":"李小明"} } ] } }%

查找"刘",为什么“李小明”也查的到?
curl http://localhost:9200/medcl/folks/_search?q=name:%e5%88%98%e5%be%b7 curl http://localhost:9200/medcl/folks/_search?q=name:liu curl http://localhost:9200/medcl/folks/_search?q=name:ldh curl http://localhost:9200/medcl/folks/_search?q=name:dehua

下面几个也是一样,请问下,这个是什么情况?谢谢

           —
           Reply to this email directly or view it on GitHub.

from elasticsearch-analysis-pinyin.

doabit avatar doabit commented on June 2, 2024

谢谢,的确是这样,如果不用ngram的话,只能查完整的 liudehua 才行

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.