提交 5f53f1a5 编写于 作者: weixin_43283383's avatar weixin_43283383

Merge branch 'master' of github.com:medcl/elasticsearch-analysis-ik

...@@ -63,7 +63,7 @@ curl -XPOST http://localhost:9200/index/_mapping -H 'Content-Type:application/js ...@@ -63,7 +63,7 @@ curl -XPOST http://localhost:9200/index/_mapping -H 'Content-Type:application/js
"content": { "content": {
"type": "text", "type": "text",
"analyzer": "ik_max_word", "analyzer": "ik_max_word",
"search_analyzer": "ik_max_word" "search_analyzer": "ik_smart"
} }
} }
......
...@@ -268,13 +268,13 @@ class AnalyzeContext { ...@@ -268,13 +268,13 @@ class AnalyzeContext {
while(l != null){ while(l != null){
this.results.add(l); this.results.add(l);
//字典中无单字,但是词元冲突了,切分出相交词元的前一个词元中的单字 //字典中无单字,但是词元冲突了,切分出相交词元的前一个词元中的单字
int innerIndex = index + 1; /*int innerIndex = index + 1;
for (; innerIndex < index + l.getLength(); innerIndex++) { for (; innerIndex < index + l.getLength(); innerIndex++) {
Lexeme innerL = path.peekFirst(); Lexeme innerL = path.peekFirst();
if (innerL != null && innerIndex == innerL.getBegin()) { if (innerL != null && innerIndex == innerL.getBegin()) {
this.outputSingleCJK(innerIndex - 1); this.outputSingleCJK(innerIndex - 1);
} }
} }*/
//将index移至lexeme后 //将index移至lexeme后
index = l.getBegin() + l.getLength(); index = l.getBegin() + l.getLength();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册