Merge branch 'master' of github.com:medcl/elasticsearch-analysis-ik
This commit is contained in:
commit
5f53f1a5bf
@ -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 {
|
|||||||
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();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user