-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add analysis components and mapping types to the usage API. #51031
Conversation
Knowing about used analysis components and mapping types would be incredibly useful in order to know which ones may be deprecated or should get more love. Some field types also act as a proxy to know about feature usage of some APIs like the `percolator` or `completion` fields types for percolation and the completion suggester, respectively.
Pinging @elastic/es-core-features (:Core/Features/Stats) |
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 left some minor comments regarding the extracted components but it looks great !
for (IndexMetaData indexMetaData : state.metaData()) { | ||
MappingMetaData mappingMetaData = indexMetaData.mapping(); | ||
if (mappingMetaData != null) { | ||
populateFieldTypesFromObject(mappingMetaData.sourceAsMap(), usedFieldTypes); |
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.
Should we also extract the analyzers set on the fields ? This could be useful to check the usage of the pre-built analyzers ?
aggregateAnalysisTypes(tokenFilterSettings.values(), usedTokenFilters); | ||
|
||
Map<String, Settings> analyzerSettings = indexSettings.getGroups("index.analysis.analyzer"); | ||
aggregateAnalysisTypes(analyzerSettings.values(), usedAnalyzers); |
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.
Should we also extract the pre-built tokenizer, filters and char_filters from custom analyzers ?
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.
+1 great to have this kind of information available!
@jimczi I added built-in analysis components. |
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 added built-in analysis components.
LGTM, thanks!
We added tracking of index feature usage in elastic#51031 but due to some copy and paste errors the test fails on some seeds. This fixes those errors.
We added tracking of index feature usage in #51031 but due to some copy and paste errors the test fails on some seeds. This fixes those errors.
We added tracking of index feature usage in elastic#51031 but due to some copy and paste errors the test fails on some seeds. This fixes those errors.
…51031) Knowing about used analysis components and mapping types would be incredibly useful in order to know which ones may be deprecated or should get more love. Some field types also act as a proxy to know about feature usage of some APIs like the `percolator` or `completion` fields types for percolation and the completion suggester, respectively.
We added tracking of index feature usage in elastic#51031 but due to some copy and paste errors the test fails on some seeds. This fixes those errors.
This doesn't appear to be in
Notice there is no |
@codebrain Good catch, it's been superseded by #51138. I removed the version labels and will remove from the release notes tomorrow. |
It's been superseded by elastic#51138.
Here is the PR #55387. |
Knowing about used analysis components and mapping types would be incredibly
useful in order to know which ones may be deprecated or should get more love.
Some field types also act as a proxy to know about feature usage of some APIs
like the
percolator
orcompletion
fields types for percolation and thecompletion suggester, respectively.