Skip to content

Commit

Permalink
startOffset must be non-negative, and endOffset must be >= startOffse…
Browse files Browse the repository at this point in the history
…t, and offsets must not go backwards修复 (infinilabs#206)

当将参数“ignore_pinyin_offset”设置为false后,并向pinyin分词字段批量写入数据,即会出现“startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards”异常。测试校验发现为在reset()时,应该同样将this.processedSortCandidate = false,即可修复此问题。
  • Loading branch information
abia321 authored and medcl committed Jun 5, 2019
1 parent 99c2ab6 commit c3f9e96
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,7 @@ public void reset() throws IOException {
this.processedFirstLetter = false;
this.processedFullPinyinLetter = false;
this.processedOriginal = false;
this.processedSortCandidate = false;
firstLetters.setLength(0);
fullPinyinLetters.setLength(0);
termsFilter.clear();
Expand Down

0 comments on commit c3f9e96

Please sign in to comment.