analysis-pinyin icon indicating copy to clipboard operation
analysis-pinyin copied to clipboard

startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards

Open wqmain opened this issue 4 years ago • 8 comments

版本 6.x,Pull记录显示已经修复了该问题,但测试问题依旧存在啊 只要配置了 "ignore_pinyin_offset": false 写数据的时候就会报错, Pull见:https://github.com/medcl/elasticsearch-analysis-pinyin/pull/206

wqmain avatar Apr 28 '20 09:04 wqmain

嗯,我这边本地测试环境版本是6.5.1,确实依然存在该问题~ 只能将"ignore_pinyin_offset": true才行~

kazaff avatar May 14 '20 09:05 kazaff

恩,新的 fix 代码还没有 backport 到 6.x 分支

medcl avatar Jun 16 '20 09:06 medcl

7.5.1 问题依旧存在, 具体触发情景未, 如果文本是已英文加分词开头的,index会出现 lastStartOffset 前移的情况 复现方式, 使用readme中的例子, 并配置 ignore_pinyin_offset=true

GET /medcl/_analyze
{
  "text": ["liu 德华"],
  "analyzer": "pinyin_analyzer"
}

结果:

{
    "tokens": [
        {
            "token": "liu",
            "start_offset": 1,
            "end_offset": 4,
            "type": "word",
            "position": 0
        },
        {
            "token": "liu 德华",
            "start_offset": 0,
            "end_offset": 6,
            "type": "word",
            "position": 0
        },
       
    ]
}

bashen1291 avatar Jul 30 '20 04:07 bashen1291

请问,这个问题6.x版本有什么临时的解决方案嘛

SanPy avatar Oct 09 '20 16:10 SanPy

7.9.3也有这个问题,不知道是不是哪里没配对。如果是pinyin单独一个字段,好像就没有问题。

zhechuan1 avatar Dec 09 '20 08:12 zhechuan1

7.10.2一样的错误

codingcn avatar Jan 30 '21 07:01 codingcn

7.6.2 也有这个错误

wansho avatar Aug 06 '21 08:08 wansho

7.6.2 也有这个错误 解决了吗

luues avatar Jun 28 '22 01:06 luues