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

Retrieve field data density via API #43704

Closed
timroes opened this issue Jun 27, 2019 · 5 comments
Closed

Retrieve field data density via API #43704

timroes opened this issue Jun 27, 2019 · 5 comments
Labels
>feature :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch

Comments

@timroes
Copy link
Contributor

timroes commented Jun 27, 2019

In the now removed field stats API we had the information about the density of data within a field. That's a useful measurement, we would like to have in Kibana for prioritizing field suggestions when creating visualizations.

Since it seems that information is no longer in the field caps API, I would like to check why it got removed, if there are some replacement APIs we can use instead and if not currently, tracking some enhancements of making that data available via API.

cc @flash1293 @wylieconlon @chrisdavies

@jimczi jimczi added :Data Management/Indices APIs APIs to create and manage indices and templates :Search Foundations/Mapping Index mappings, including merging and defining field types >feature labels Jun 27, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-features

@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search

@jpountz
Copy link
Contributor

jpountz commented Jul 18, 2019

The general motivation was to move logic from Kibana to Elasticsearch. We replaced field stats with field caps at the same time as we removed the need for Kibana to select the relevant indices based on the time range by introducing the new can_match phase.

The field caps API is more lightweight than the field stats API since it only needs to look at the mappings of an index. In practice it means it only needs to go to one shard for each of the queried indices. On the other hand, field stats exposed information about the data, so it had to go to every queried shard and request some metadata such as the min/max values and document counts for every field. Nothing that can't be changed, but this is worth consideration.

If you are mostly interested in getting information about fields that actually exist in indices, then we have been discussing ways to fix this information at index-time, e.g. by giving Beats one index per module instead of having mappings that include fields for every possible module including the disabled ones. This would be a better fix in my opinion.

Regarding ranking field suggestions, maybe one metric we could expose somehow would be the number of indices that have this field.

@dakrone dakrone removed the :Data Management/Indices APIs APIs to create and manage indices and templates label Sep 6, 2019
@rjernst rjernst added the Team:Search Meta label for search team label May 4, 2020
@javanna
Copy link
Member

javanna commented Jun 16, 2022

No activity in 3 years, closing for now, feel free to reopen / comment if this enhancement request is still important, so that we can re-open the discussion around it.

@javanna javanna closed this as completed Jun 16, 2022
@javanna javanna added Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch and removed Team:Search Meta label for search team labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
>feature :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Foundations Meta label for the Search Foundations team in Elasticsearch
Projects
None yet
Development

No branches or pull requests

8 participants