Error creating a document with pinyin-plugin in es 6.0.0


(Idiotslkp) #1

When I use es 6.0.0 creating a document with pinyin-puigin,it will cause error:
{
"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=27,lastStartOffset=25 for field 'standardName.pinyin'"
}
],
"type": "illegal_argument_exception",
"reason": "startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=0,endOffset=27,lastStartOffset=25 for field 'standardName.pinyin'"
},
"status": 400
}

And the pinyin-plugin address:

my testing mapping is:
PUT test
{
"index": {
"analysis": {
"analyzer": {
"pinyin_analyzer": {
"tokenizer": "my_pinyin"
}
},
"tokenizer": {
"my_pinyin": {
"type": "pinyin",
"keep_separate_first_letter": false,
"keep_full_pinyin": true,
"keep_original": true,
"limit_first_letter_length": 16,
"lowercase": true,
"remove_duplicated_term": true
}
}
}
}
}

POST test/test_type/_mapping
{
"test_type": {
"properties": {
"standardName": {
"type": "keyword",
"fields": {
"pinyin": {
"type": "text",
"store": false,
"term_vector": "with_offsets",
"analyzer": "pinyin_analyzer",
"boost": 10
}
}
}
}
}
}

Now,when I post following data more than 5,the error will occur:
POST test/test_type
{
"standardName": "居住区大气中苯、甲苯和二甲苯卫生检验标准方法气相色谱法"
}


(Idiotslkp) #2

I solve this problom when I use es 6.0.1 and use pinyin-plugin 6.0.1......


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.