Giter VIP home page Giter VIP logo

Comments (13)

quezier avatar quezier commented on July 30, 2024

在线等,搞了好几天了。。。

from elasticsearch-analysis-pinyin.

dingding2015 avatar dingding2015 commented on July 30, 2024

拼音 + Ik 分词

from elasticsearch-analysis-pinyin.

quezier avatar quezier commented on July 30, 2024

@dingding2015 但是我现在只能pinyin起效果,输入汉字搜不出。。。

from elasticsearch-analysis-pinyin.

quezier avatar quezier commented on July 30, 2024

原来按照@medcl大神的设置就行了,只是我一直用head插件去查,查不出,直接用命令_search就可以了。。。。。。,感谢大神开发了这么强大的插件!

from elasticsearch-analysis-pinyin.

651016236 avatar 651016236 commented on July 30, 2024

@fuyingque 你怎么配置的能贴下你的配置吗?我拼音分词后用拼音完全搜不出来

from elasticsearch-analysis-pinyin.

651016236 avatar 651016236 commented on July 30, 2024

{ "settings":{ "index":{ "number_of_shards": 5, "number_of_replicas": 1 }, "analysis" : { "analyzer" : { "custom_pinyin_analyzer" : { "tokenizer" : "ik_smart", "filter" : ["full_pinyin_no_space","full_pinyin_with_space","first_letter_pinyin"] } }, "filter" :{ "full_pinyin_no_space" : { "type" : "pinyin", "first_letter" : "none", "padding_char" : " " }, "full_pinyin_with_space" : { "type" : "pinyin", "first_letter" : "none", "padding_char" : " " }, "first_letter_pinyin" : { "type" : "pinyin", "first_letter" : "only", "padding_char" : " " } } }, "mappings": { "books": { "properties": { "title": { "type":"string", "index":"analyzed", "analyzer":"custom_pinyin_analyzer", "search_analyzer":"custom_pinyin_analyzer", "boost": 10 } } } } } }

from elasticsearch-analysis-pinyin.

quezier avatar quezier commented on July 30, 2024

@651016236 配置跟你的一样,你是用什么搜的,不要用head插件,要这样:$ curl -XGET 'http://localhost:9200/twitter/_search?q=user:kimchy'去搜才行,而且用php客户端

from elasticsearch-analysis-pinyin.

651016236 avatar 651016236 commented on July 30, 2024

以下是我分词分出来来的拼音,然后用你的这个方法去查,还是查不出来,但是直接用中文搜是可以搜出来的,用拼音完全不行,哥们可以加下qq不?在线向你咨询下呵呵,我的q是651016236
用这句还是搞不出来
GET library/books/_search?q=title:lianxiang
`GET /library/_analyze?analyzer=custom_pinyin_analyzer
{
"text":"联想召回笔记本电源线"
}

{
"tokens": [
{
"token": "lianxiang",
"start_offset": 0,
"end_offset": 2,
"type": "CN_WORD",
"position": 0
},
{
"token": "zhaohui",
"start_offset": 2,
"end_offset": 4,
"type": "CN_WORD",
"position": 1
},
{
"token": "zhao",
"start_offset": 2,
"end_offset": 3,
"type": "CN_WORD",
"position": 2
},
{
"token": "hui",
"start_offset": 3,
"end_offset": 4,
"type": "CN_WORD",
"position": 3
},
{
"token": "bijiben",
"start_offset": 4,
"end_offset": 7,
"type": "CN_WORD",
"position": 4
},
{
"token": "biji",
"start_offset": 4,
"end_offset": 6,
"type": "CN_WORD",
"position": 5
},
{
"token": "bi",
"start_offset": 4,
"end_offset": 5,
"type": "CN_WORD",
"position": 6
},
{
"token": "ji",
"start_offset": 5,
"end_offset": 6,
"type": "CN_CHAR",
"position": 7
},
{
"token": "ben",
"start_offset": 6,
"end_offset": 7,
"type": "CN_CHAR",
"position": 8
},
{
"token": "dianyuanxian",
"start_offset": 7,
"end_offset": 10,
"type": "CN_WORD",
"position": 9
},
{
"token": "dianyuan",
"start_offset": 7,
"end_offset": 9,
"type": "CN_WORD",
"position": 10
},
{
"token": "xian",
"start_offset": 9,
"end_offset": 10,
"type": "CN_CHAR",
"position": 11
}
]
}
`

from elasticsearch-analysis-pinyin.

651016236 avatar 651016236 commented on July 30, 2024

@fuyingque 哥们加个q,刚才忘记@你了,qq号是我用户名

from elasticsearch-analysis-pinyin.

651016236 avatar 651016236 commented on July 30, 2024

@fuyingque 对了我用的是elasticsearch2.2.1版本的,不知道版本会不会影响到搜索

from elasticsearch-analysis-pinyin.

medcl avatar medcl commented on July 30, 2024

欢迎试试最新版本

from elasticsearch-analysis-pinyin.

syncml avatar syncml commented on July 30, 2024

最新版本的这个设置可以吗? @medcl

from elasticsearch-analysis-pinyin.

medcl avatar medcl commented on July 30, 2024

@syncml 可以的。默认使用pinyin的analyzer就可以,不用太多设置。

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.