sing1ee / elasticsearch-jieba-plugin

jieba analysis plugin for elasticsearch 7.0.0, 6.4.0, 6.0.0, 5.4.0,5.3.0, 5.2.2, 5.2.1, 5.2, 5.1.2, 5.1.1

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

illegal_argument_exception: startOffset must be non-negative

boling-wang opened this issue · comments

PUT jieba_index
{
  "settings": {
    "analysis": {
      "analyzer": {
        "jieba_analyzer": {
          "tokenizer": "jieba_index"
        }
      }
    }
  },
  "mappings": {
    "fulltext": {
      "properties": {
        "content": {
          "type": "text",
          "analyzer": "jieba_analyzer"
        }
      }
    }
  }
}
POST jieba_index/fulltext
{"content":"李海林"}

ES 返回:

{
  "error": {
    "root_cause": [
      {
        "type": "illegal_argument_exception",
        "reason": "startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=0,endOffset=3,lastStartOffset=1 for field 'content'"
      }
    ],
    "type": "illegal_argument_exception",
    "reason": "startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=0,endOffset=3,lastStartOffset=1 for field 'content'"
  },
  "status": 400
}

P.S.
Elasticsearch version:6.1.0
Jieba plugin基于6.0.0,自己编译的。

@boling-wang 我测试一下

@boling-wang 使用maser分支的。
另外,我已经合并到6.0.0分支

验证ok了,多谢快速回复。