Comments (13)
在线等,搞了好几天了。。。
from elasticsearch-analysis-pinyin.
拼音 + Ik 分词
from elasticsearch-analysis-pinyin.
@dingding2015 但是我现在只能pinyin起效果,输入汉字搜不出。。。
from elasticsearch-analysis-pinyin.
原来按照@medcl大神的设置就行了,只是我一直用head插件去查,查不出,直接用命令_search就可以了。。。。。。,感谢大神开发了这么强大的插件!
from elasticsearch-analysis-pinyin.
@fuyingque 你怎么配置的能贴下你的配置吗?我拼音分词后用拼音完全搜不出来
from elasticsearch-analysis-pinyin.
{ "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.
@651016236 配置跟你的一样,你是用什么搜的,不要用head插件,要这样:$ curl -XGET 'http://localhost:9200/twitter/_search?q=user:kimchy'去搜才行,而且用php客户端
from elasticsearch-analysis-pinyin.
以下是我分词分出来来的拼音,然后用你的这个方法去查,还是查不出来,但是直接用中文搜是可以搜出来的,用拼音完全不行,哥们可以加下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.
@fuyingque 哥们加个q,刚才忘记@你了,qq号是我用户名
from elasticsearch-analysis-pinyin.
@fuyingque 对了我用的是elasticsearch2.2.1版本的,不知道版本会不会影响到搜索
from elasticsearch-analysis-pinyin.
欢迎试试最新版本
from elasticsearch-analysis-pinyin.
最新版本的这个设置可以吗? @medcl
from elasticsearch-analysis-pinyin.
@syncml 可以的。默认使用pinyin的analyzer就可以,不用太多设置。
from elasticsearch-analysis-pinyin.
Related Issues (20)
- 关于zh,ch,sh无法查询到相关的词语
- 关于示例中name.pinyin搜索能直接搜中文英文 HOT 1
- 没有高亮 HOT 2
- No installable zip in release assets for v8.4.2 and v8.4.3 HOT 1
- es 8.5X版本无法建立mapping HOT 1
- v6.8.20 源码和jar包对不上
- es7.17.0 使用7.17.0版本依然报错startOffset HOT 3
- 求助,使用match_phrase搜索不到结果 HOT 4
- 中文首字符携带数字排序不理解大小
- 严重BUG:当分词内容中包含单独的A字母时,这个A字母会被分词器扔掉 HOT 1
- 如何解决同音字的问题 HOT 2
- 没有7.17.10版本吗? HOT 1
- elasticsearch8.7.0可以使用7.x版本的拼音吗 HOT 3
- 怎么在分词后保留"c++软件工程师"中“+”号在结果中,为什么拼音分词器会过滤掉符号呢
- 中英文混合时能否也支持下提取英文单词首字母
- 拼音首字母查询问题,当第二个字的拼音首字母为第一个字的韵母时查询不到结果 HOT 1
- 构建了 8.10.2 ,8.10.3,8.10.4,7.17.14供使用 HOT 6
- 求ES 8.12版本的插件 HOT 2
- ES8.9.2,release版本没有编译好的jar包 HOT 1
- 希望提供8.13.2、7.17.19版本插件 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from elasticsearch-analysis-pinyin.