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

Make sure that IdFieldType#isAggregatable is accurate. #62903

Merged
merged 3 commits into from
Oct 5, 2020

Conversation

jtibshirani
Copy link
Contributor

@jtibshirani jtibshirani commented Sep 24, 2020

Before, it always returned 'true' even when the setting
"indices.id_field_data.enabled" was false.

Fixes #62897.

Before, it always returned 'true' even when the setting
"indices.id_field_data.enabled" was false.
@jtibshirani
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/2

@jtibshirani jtibshirani marked this pull request as ready for review September 25, 2020 02:18
throw new IllegalArgumentException("Fielddata access on the _id field is disallowed, "
+ "you can re-enable it by updating the dynamic cluster setting: "
+ IndicesService.INDICES_ID_FIELD_DATA_ENABLED_SETTING.getKey());
}
deprecationLogger.deprecate("id_field_data", ID_FIELD_DATA_DEPRECATION_MESSAGE);
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 kept the deprecation message here so we don't issue a warning on every call to field caps.

Copy link
Contributor

@jimczi jimczi left a comment

Choose a reason for hiding this comment

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

LGTM

@jimczi jimczi added :Search Foundations/Mapping Index mappings, including merging and defining field types >bug v7.10.0 v8.0.0 labels Sep 28, 2020
@elasticmachine
Copy link
Collaborator

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

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Sep 28, 2020
@jtibshirani
Copy link
Contributor Author

The refactor #63197 was merged concurrently, and happens to fix the bug. So after merging with master, this PR is now a test-only change that verifies the fix.

@jtibshirani
Copy link
Contributor Author

@elasticmachine run elasticsearch-ci/1
@elasticmachine run elasticsearch-ci/2

@jtibshirani jtibshirani merged commit dba2f50 into elastic:master Oct 5, 2020
@jtibshirani jtibshirani deleted the field-caps-id branch October 5, 2020 17:48
jtibshirani added a commit that referenced this pull request Oct 6, 2020
Before, it always returned 'true' even when the setting
"indices.id_field_data.enabled" was false.

Fixes #62897.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>bug :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v7.10.0 v8.0.0-alpha1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

field _id is not aggregatable but field_caps says its aggregatable
4 participants