Add aggregation size to Advanced Settings (#11818)

The discover:aggs:terms:size config value was never added to the default values, so when the trash-button is clicked it removes the config completely and causes discover to send an empty size param to visualize.
This commit is contained in:
Thomas Neirynck 2017-05-16 16:50:32 -04:00 committed by GitHub
parent dcc6b42548
commit c1e09d5b0e
3 changed files with 9 additions and 2 deletions

View file

@ -33,6 +33,7 @@ adapt to the interval between measurements. Keys are http://en.wikipedia.org/wik
`metaFields`:: An array of fields outside of `_source`. Kibana merges these fields into the document when displaying the
document.
`discover:sampleSize`:: The number of rows to show in the Discover table.
`discover:aggs:terms:size`:: Determines how many terms will be visualized when clicking the "visualize" button, in the field drop downs, in the discover sidebar. The default value is `20`.
`doc_table:highlight`:: Highlight results in Discover and Saved Searches Dashboard. Highlighting makes request slow when
working on big documents. Set this property to `false` to disable highlighting.
`doc_table:highlight:all_fields`:: Improves highlighting by using a separate `highlight_query` that uses `all_fields` mode on

View file

@ -186,7 +186,7 @@ app.directive('discFieldChooser', function ($location, globalState, config, $rou
schema: 'segment',
params: {
field: field.name,
size: config.get('discover:aggs:terms:size', 20),
size: parseInt(config.get('discover:aggs:terms:size'), 10),
orderBy: '2'
}
};

View file

@ -70,6 +70,12 @@ export default function defaultSettingsProvider() {
value: 500,
description: 'The number of rows to show in the table',
},
'discover:aggs:terms:size': {
value: 20,
type: 'number',
description: 'Determines how many terms will be visualized when clicking the "visualize" ' +
'button, in the field drop downs, in the discover sidebar.'
},
'doc_table:highlight': {
value: true,
description: 'Highlight results in Discover and Saved Searches Dashboard.' +
@ -326,6 +332,6 @@ export default function defaultSettingsProvider() {
'context:step': {
value: 5,
description: 'The step size to increment or decrement the context size by',
},
}
};
}