Skip to content

Conversation

@cbuescher
Copy link
Member

Currently we loose information about whether a token list in an AnalyzeAction
response is null or an empty list, because we write a 0 value to the stream in
both cases and deserialize to a null value on the receiving side. This was fixed
in #44284 by a change in the serialization protocol starting in 7.3. However
this PR fixes the symptoms without changing the wire protocol which we cannot to
easily on 6.8 because we already released incompatible versions in the 7.x line.
This change adds special handling on xcontent output and if getToken() is
callled on either AnalyzeResponse or DetailedAnalyzeResponse to always return
empty lists instead of null values.

Relates to #44078

Currently we loose information about whether a token list in an AnalyzeAction
response is null or an empty list, because we write a 0 value to the stream in
both cases and deserialize to a null value on the receiving side. This was fixed
in elastic#44284 by a change in the serialization protocol starting in 7.3. However
this PR fixes the symptoms without changing the wire protocol which we cannot to
easily on 6.8 because we already released incompatible versions in the 7.x line.
This change adds special handling on xcontent output and if getToken() is
callled on either AnalyzeResponse or DetailedAnalyzeResponse to always return
empty lists instead of null values.

Relates to elastic#44078
@cbuescher cbuescher added >bug :Search Relevance/Analysis How text is split into tokens v6.8.2 labels Jul 15, 2019
@cbuescher cbuescher requested a review from romseygeek July 15, 2019 11:32
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@cbuescher
Copy link
Member Author

@romseygeek not sure this really needs to be fixed on 6.8, its a bit of a band-aid compared to the fix in #44284 and I'm not sure we'll be having another 6.8 release but might as well get it in there just in case.

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks Christoph

@cbuescher
Copy link
Member Author

@elasticmachine run elasticsearch-ci/1

1 similar comment
@cbuescher
Copy link
Member Author

@elasticmachine run elasticsearch-ci/1

@cbuescher
Copy link
Member Author

@elasticmachine run elasticsearch-ci/2

1 similar comment
@cbuescher
Copy link
Member Author

@elasticmachine run elasticsearch-ci/2

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

Labels

>bug :Search Relevance/Analysis How text is split into tokens v6.8.2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants