OffSet Issue While Indexing

OpenSearch Version - 2.8.0

We have created a custom tokenizer in opensearch while indexing data we are getting below 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=5,lastStartOffset=4 for field ‘title_special.en’”}],“type”:“illegal_argument_exception”,“reason”:“startOffset must be non-negative, and endOffset must be >= startOffset, and offsets must not go backwards startOffset=0,endOffset=5,lastStartOffset=4 for field ‘title_special.en’”},“status”:400}

From the analyze query we are getting below tokens
{
“tokens” : [
{
“token” : “test:data”,
“start_offset” : 0,
“end_offset” : 9,
“type” : “word”,
“position” : 0
},
{
“token” : “test”,
“start_offset” : 0,
“end_offset” : 4,
“type” : “word”,
“position” : 0
},
{
“token” : “:data”,
“start_offset” : 4,
“end_offset” : 9,
“type” : “word”,
“position” : 0
},
{
“token” : “test:”,
“start_offset” : 0,
“end_offset” : 5,
“type” : “word”,
“position” : 0
},
{
“token” : “test”,
“start_offset” : 10,
“end_offset” : 14,
“type” : “word”,
“position” : 1
}
]
}

Please help with the fix.