Skip to content
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

SourceValueFetcher should check all possible source fields #65375

Merged
merged 3 commits into from
Nov 24, 2020

Conversation

romseygeek
Copy link
Contributor

This commit fixes a bug where SourceValueFetcher was returning
an empty set of values if any of its source fields were empty; instead,
we skip over the empty value and continue collecting from all other
source fields.

@romseygeek romseygeek added >bug :Search/Search Search-related issues that do not fall into other categories v8.0.0 v7.11.0 v7.10.1 labels Nov 23, 2020
@romseygeek romseygeek self-assigned this Nov 23, 2020
@elasticmachine elasticmachine added the Team:Search Meta label for search team label Nov 23, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (Team:Search)

Copy link
Contributor

@jtibshirani jtibshirani left a comment

Choose a reason for hiding this comment

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

Thanks for catching this important bug! I made a note about moving the test, but after that's addressed it looks ready to merge.

@@ -635,4 +642,34 @@ public void testCopyFromMultiField() {
assertThat(e.getMessage(),
Matchers.containsString("[copy_to] may not be used to copy from a multi-field: [field.bar]"));
}

public void testCopyToValueFetching() throws IOException {
Copy link
Contributor

Choose a reason for hiding this comment

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

We could move this to FieldFetcherTests, so all field retrieval tests are in one place. It already has a case around copy_to.

@romseygeek
Copy link
Contributor Author

@elasticmachine update branch

@romseygeek romseygeek merged commit f0e1102 into elastic:master Nov 24, 2020
@romseygeek romseygeek deleted the fetch-copy-fields branch November 24, 2020 12:02
romseygeek added a commit that referenced this pull request Nov 24, 2020
This commit fixes a bug where SourceValueFetcher was returning
an empty set of values if any of its source fields were empty; instead,
we skip over the empty value and continue collecting from all other
source fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team v7.10.1 v7.11.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants