-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Offset Bug #61
Labels
Comments
Thanks for your report @sylvae, I'll investigate. |
Hi a, ES 7.0.0 still have a sample issue mapping
The tokenizer is work fine
Thank you for help |
@sylvae @tienthanh2509 this bug has been fixed in new release v7.3.1. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi , I got a bug when I use this elasticsearch-analysis-vietnamese:
My index mappings:
PUT /test { "mappings": { "properties":{ "content":{ "type": "text", "analyzer": "vi_analyzer" } } } }
And when I index the data:
POST test/_doc/1 { "content":"Phụ tùng xe Mazda bán tải dưới 7 chỗ: ống dẫn gió tới két làm mát khí nạp- cao su lưu hóa, mới 100%, phục vụ BHBD. Ms:1D0013246A" }
ES return errors:
{ "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=95,endOffset=96,lastStartOffset=115 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=95,endOffset=96,lastStartOffset=115 for field 'content'" }, "status": 400 }
And I tried analyze test:
POST _analyze { "analyzer": "vi_analyzer", "text": "Phụ tùng xe Mazda bán tải dưới 7 chỗ: ống dẫn gió tới két làm mát khí nạp- cao su lưu hóa, mới 100%, phục vụ BHBD. Ms:1D0013246A" }
ES returns:
{ "tokens": [ { "token": "phụ tùng", "start_offset": 0, "end_offset": 8, "type": "<PHRASE>", "position": 0 }, { "token": "xe", "start_offset": 9, "end_offset": 11, "type": "<PHRASE>", "position": 1 }, { "token": "mazda", "start_offset": 12, "end_offset": 17, "type": "<PHRASE>", "position": 2 }, { "token": "bán", "start_offset": 18, "end_offset": 21, "type": "<PHRASE>", "position": 3 }, { "token": "tải", "start_offset": 22, "end_offset": 25, "type": "<PHRASE>", "position": 4 }, { "token": "7", "start_offset": 31, "end_offset": 32, "type": "<NUMBER>", "position": 6 }, { "token": "chỗ", "start_offset": 33, "end_offset": 36, "type": "<PHRASE>", "position": 7 }, { "token": "ống", "start_offset": 38, "end_offset": 41, "type": "<PHRASE>", "position": 8 }, { "token": "dẫn", "start_offset": 42, "end_offset": 45, "type": "<PHRASE>", "position": 9 }, { "token": "gió", "start_offset": 46, "end_offset": 49, "type": "<PHRASE>", "position": 10 }, { "token": "tới", "start_offset": 50, "end_offset": 53, "type": "<PHRASE>", "position": 11 }, { "token": "két", "start_offset": 54, "end_offset": 57, "type": "<PHRASE>", "position": 12 }, { "token": "làm", "start_offset": 58, "end_offset": 61, "type": "<PHRASE>", "position": 13 }, { "token": "mát", "start_offset": 62, "end_offset": 65, "type": "<PHRASE>", "position": 14 }, { "token": "khí", "start_offset": 66, "end_offset": 69, "type": "<PHRASE>", "position": 15 }, { "token": "nạp", "start_offset": 70, "end_offset": 73, "type": "<PHRASE>", "position": 16 }, { "token": "cao su", "start_offset": 75, "end_offset": 81, "type": "<PHRASE>", "position": 17 }, { "token": "lưu hóa", "start_offset": 82, "end_offset": 89, "type": "<PHRASE>", "position": 18 }, { "token": "mới", "start_offset": 91, "end_offset": 94, "type": "<PHRASE>", "position": 19 }, { "token": "100%", "start_offset": 95, "end_offset": 99, "type": "<PERCENTAGE>", "position": 20 }, { "token": "phục vụ", "start_offset": 101, "end_offset": 108, "type": "<PHRASE>", "position": 21 }, { "token": "bhbd", "start_offset": 109, "end_offset": 113, "type": "<PHRASE>", "position": 22 }, { "token": "ms", "start_offset": 115, "end_offset": 117, "type": "<PHRASE>", "position": 23 }, { "token": "1", "start_offset": 95, "end_offset": 96, "type": "<NUMBER>", "position": 24 }, { "token": "d0", "start_offset": 119, "end_offset": 121, "type": "<ALLCAPS>", "position": 25 }, { "token": "013246", "start_offset": 121, "end_offset": 127, "type": "<NUMBER>", "position": 26 }, { "token": "a", "start_offset": 127, "end_offset": 128, "type": "<PHRASE>", "position": 27 } ] }
Token "100%" and token "1" have the same startOffset,so may be it is a bug.
I build the Elasticsearch Vietnamese Analysis Plugin by myself for Elasticsearch-7.3.0.
Thank you for help!
The text was updated successfully, but these errors were encountered: