diff --git a/src/core_plugins/kibana/public/discover/components/field_chooser/lib/detail_views/string.html b/src/core_plugins/kibana/public/discover/components/field_chooser/lib/detail_views/string.html index a8efff032d541..734588c82f8e0 100644 --- a/src/core_plugins/kibana/public/discover/components/field_chooser/lib/detail_views/string.html +++ b/src/core_plugins/kibana/public/discover/components/field_chooser/lib/detail_views/string.html @@ -44,7 +44,7 @@
Quick Count Visualize diff --git a/src/ui/public/index_patterns/_field.js b/src/ui/public/index_patterns/_field.js index 54cb8f86364b0..621e4c0fda8b7 100644 --- a/src/ui/public/index_patterns/_field.js +++ b/src/ui/public/index_patterns/_field.js @@ -42,6 +42,9 @@ export default function FieldObjectProvider(Private, shortDotsFilter, $rootScope let scripted = !!spec.scripted; let sortable = spec.name === '_score' || ((indexed || scripted) && type.sortable); let filterable = spec.name === '_id' || scripted || (indexed && type.filterable); + let searchable = !!spec.searchable || scripted; + let aggregatable = !!spec.aggregatable || scripted; + let visualizable = aggregatable; obj.fact('name'); obj.fact('type'); @@ -58,13 +61,14 @@ export default function FieldObjectProvider(Private, shortDotsFilter, $rootScope obj.fact('doc_values', !!spec.doc_values); // stats - obj.fact('searchable', !!spec.searchable || scripted); - obj.fact('aggregatable', !!spec.aggregatable || scripted); + obj.fact('searchable', searchable); + obj.fact('aggregatable', aggregatable); // usage flags, read-only and won't be saved obj.comp('format', format); obj.comp('sortable', sortable); obj.comp('filterable', filterable); + obj.comp('visualizable', visualizable); // computed values obj.comp('indexPattern', indexPattern);