@@ -71,12 +71,12 @@ export async function fetchData(core: CoreSetup, indexName, fieldName) {
7171 const field = indexPattern . fields . find ( ( { name } ) => name === fieldName ) ;
7272 const initialSearchSourceState : SearchSourceFields = {
7373 timeout : "1000ms" ,
74- terminate_after : 100000 ,
74+ terminate_after : 100000 , //from elastic_search, per shard
7575 } ;
7676 const query = null ;
7777 const aggs = termsAgg ( {
7878 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
8080 direction : 'desc' ,
8181 query,
8282 } ) ;
@@ -108,15 +108,15 @@ export async function fetchData(core: CoreSetup, indexName, fieldName) {
108108 // If the fetch was aborted then no need to surface this error in the UI
109109 if ( error . name === 'AbortError' )
110110 return ;
111- this . disable ( 'Unable to fetch terms, error: {error.message}' ) ; //TODO
111+ // this.disable('Unable to fetch terms, error: {error.message}'); //TODO
112112 return ;
113113 }
114114 const selectOptions = _ . get ( resp , 'aggregations.termsAgg.buckets' , [ ] ) . map ( ( bucket : any ) => {
115115 return bucket ?. key ;
116116 } ) ;
117117
118118 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));
120120 return ;
121121 }
122122
0 commit comments