Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@m0nhawk
Copy link
Contributor

@m0nhawk m0nhawk commented Oct 26, 2021

New Features

Breaking Changes

Bug Fixes

Improvements

  • Not asking Elasticsearch for _source field

Dependency updates

Deployment changes

if (fields) {
const esFields = fromFieldsToSource(fields);
if (esFields.length > 0) queryBody._source = esFields;
if (fields !== undefined) {
Copy link
Contributor

Choose a reason for hiding this comment

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

why don't do a single if (typeof fields !== 'undefined') and set queryBody._source = false; in its else clause?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think it'll break the backward compatibility, in case there is code that doesn't define fields, but still uses _source for something.

mfshao
mfshao previously approved these changes Oct 27, 2021
Copy link
Contributor

@mfshao mfshao left a comment

Choose a reason for hiding this comment

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

@m0nhawk m0nhawk merged commit 9abcfc0 into master Oct 28, 2021
@m0nhawk m0nhawk deleted the feat/_source-handling branch October 28, 2021 18:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants