I'm trying to create kibana plugin that refreshes kibana index-pattern. Instead of doing it periodically.
Is there any way we can check after user has loaded the discover or visualize page, if the selected index pattern needs to be refreshed without comparing the mapping with the cached fields?
Or will I need to compare the output of
/api/index_patterns/_fields_for_wildcard?pattern=test and existing field and refresh if needed?
kibana version - 6.4.2