-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Cleanup IndexFieldData visibility #25900
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
Conversation
Today we expose `IndexFieldDataService` outside of IndexService to do maintainance or lookup field data in different ways. Yet, we have a streamlined way to access IndexFieldData via `QueryShardContext` that should encapsulate all access to it. This also ensures that we control all other functionality like cache clearing etc. This change also removes the `recycler` option from `ClearIndicesCacheRequest` this option is a no-op and should have been removed long ago.
| private boolean requestCache = false; | ||
| private String[] fields = null; | ||
| private String[] fields = Strings.EMPTY_ARRAY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that change alone makes me happy
| indexFieldData.clearField(field); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see you did not change that logic but it confuses me a bit as it seems we always clear fileddata even when fieldDataCache is false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah we are on the same page. I will open a followup with a BWC break
jimczi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM for the code, tests failed to compile ;)
Today we expose `IndexFieldDataService` outside of IndexService to do maintenance or lookup field data in different ways. Yet, we have a streamlined way to access IndexFieldData via `QueryShardContext` that should encapsulate all access to it. This also ensures that we control all other functionality like cache clearing etc. This change also removes the `recycler` option from `ClearIndicesCacheRequest` this option is a no-op and should have been removed long ago.
Today we expose `IndexFieldDataService` outside of IndexService to do maintenance or lookup field data in different ways. Yet, we have a streamlined way to access IndexFieldData via `QueryShardContext` that should encapsulate all access to it. This also ensures that we control all other functionality like cache clearing etc. This change also removes the `recycler` option from `ClearIndicesCacheRequest` this option is a no-op and should have been removed long ago.
Today we expose
IndexFieldDataServiceoutside of IndexService to do maintainanceor lookup field data in different ways. Yet, we have a streamlined way to access IndexFieldData
via
QueryShardContextthat should encapsulate all access to it. This also ensures that we controlall other functionality like cache clearing etc.
This change also removes the
recycleroption fromClearIndicesCacheRequestthis option is a no-op and should have been removed long ago.