mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
* set parameters like suggestions api * provide timeout and terminate_after in initial state instead of using search_source set * remove shard_size param and add comment about needed to replace searchsource with suggestions API
This commit is contained in:
parent
3783e41664
commit
9a7e9f1a51
2 changed files with 9 additions and 5 deletions
|
@ -7,9 +7,9 @@ const termsAgg = (field, size, direction) => {
|
|||
size = 1;
|
||||
}
|
||||
const terms = {
|
||||
'size': size,
|
||||
'order': {
|
||||
'_count': direction
|
||||
size: size,
|
||||
order: {
|
||||
_count: direction
|
||||
}
|
||||
};
|
||||
if (field.scripted) {
|
||||
|
@ -44,7 +44,11 @@ class ListControl extends Control {
|
|||
|
||||
export async function listControlFactory(controlParams, kbnApi) {
|
||||
const indexPattern = await kbnApi.indexPatterns.get(controlParams.indexPattern);
|
||||
const searchSource = new kbnApi.SearchSource();
|
||||
// TODO replace SearchSource with call to suggestions API
|
||||
const searchSource = new kbnApi.SearchSource({
|
||||
timeout: '1s',
|
||||
terminate_after: 100000
|
||||
});
|
||||
searchSource.inherits(false); //Do not filter by time so can not inherit from rootSearchSource
|
||||
searchSource.size(0);
|
||||
searchSource.index(indexPattern);
|
||||
|
|
|
@ -98,7 +98,7 @@ export function SearchSourceProvider(Promise, Private, config) {
|
|||
'size',
|
||||
'source',
|
||||
'version',
|
||||
'fields',
|
||||
'fields'
|
||||
];
|
||||
|
||||
SearchSource.prototype.index = function (indexPattern) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue