Skip to content

[ML] Fix end offset for first_non_blank_line char_filter#73882

Merged
droberts195 merged 1 commit intoelastic:7.xfrom
droberts195:fix_end_offset_for_first_non_blank_line_filter_7x
Jun 8, 2021
Merged

[ML] Fix end offset for first_non_blank_line char_filter#73882
droberts195 merged 1 commit intoelastic:7.xfrom
droberts195:fix_end_offset_for_first_non_blank_line_filter_7x

Conversation

@droberts195
Copy link
Copy Markdown

@droberts195 droberts195 commented Jun 8, 2021

When the input gets chopped by a char_filter immediately after
a token, that token must be reported as ending at the very end
of the original input, otherwise analysis will have incorrect
offsets when multiple field values are analyzed in the same
_analyze request.

The pattern_replace filter works like this. This PR changes
the new first_non_blank_line filter to work in the same way.

Backport of #73828

When the input gets chopped by a char_filter immediately after
a token, that token must be reported as ending at the very end
of the original input, otherwise analysis will have incorrect
offsets when multiple field values are analyzed in the same
_analyze request.

The pattern_replace filter works like this.  This PR changes
the new first_non_blank_line filter to work in the same way.

Backport of elastic#73828
@droberts195 droberts195 merged commit e49b21f into elastic:7.x Jun 8, 2021
@droberts195 droberts195 deleted the fix_end_offset_for_first_non_blank_line_filter_7x branch June 8, 2021 08:38
droberts195 added a commit to droberts195/elasticsearch that referenced this pull request Jun 8, 2021
Now that elastic#73882 is merged the test should pass on master.

Relates elastic#73828
droberts195 added a commit that referenced this pull request Jun 8, 2021
Now that #73882 is merged the test should pass on master.

Relates #73828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant