@@ -71,12 +71,12 @@ export async function fetchData(core: CoreSetup, indexName, fieldName) {
71
71
const field = indexPattern . fields . find ( ( { name } ) => name === fieldName ) ;
72
72
const initialSearchSourceState : SearchSourceFields = {
73
73
timeout : "1000ms" ,
74
- terminate_after : 100000 ,
74
+ terminate_after : 100000 , //from elastic_search, per shard
75
75
} ;
76
76
const query = null ;
77
77
const aggs = termsAgg ( {
78
78
field : indexPattern . fields . getByName ( "state.keyword" ) ,
79
- size : 100 , //null means 10 as default bucket size
79
+ size : 100 , //if set to null, returns only top 10 states
80
80
direction : 'desc' ,
81
81
query,
82
82
} ) ;
@@ -108,15 +108,15 @@ export async function fetchData(core: CoreSetup, indexName, fieldName) {
108
108
// If the fetch was aborted then no need to surface this error in the UI
109
109
if ( error . name === 'AbortError' )
110
110
return ;
111
- this . disable ( 'Unable to fetch terms, error: {error.message}' ) ; //TODO
111
+ // this.disable('Unable to fetch terms, error: {error.message}'); //TODO
112
112
return ;
113
113
}
114
114
const selectOptions = _ . get ( resp , 'aggregations.termsAgg.buckets' , [ ] ) . map ( ( bucket : any ) => {
115
115
return bucket ?. key ;
116
116
} ) ;
117
117
118
118
if ( selectOptions . length === 0 ) {
119
- this . disable ( 'No value to display' ) ; //TODO noValuesDisableMsg(fieldName, indexPattern.title));
119
+ // this.disable('No value to display'); //TODO noValuesDisableMsg(fieldName, indexPattern.title));
120
120
return ;
121
121
}
122
122
0 commit comments