import { IUiSettingsClient } from 'kibana/server' ; import { UI_SETTINGS } from '../../../../../../data/server' ; export async function getEsQueryConfig ( uiSettings ) { const allowLeadingWildcards = await uiSettings . get ( UI_SETTINGS . QUERY_ALLOW_LEADING_WILDCARDS ) ; const queryStringOptions = await uiSettings . get ( UI_SETTINGS . QUERY_STRING_OPTIONS ) ; const ignoreFilterIfFieldNotInIndex = await uiSettings . get ( UI_SETTINGS . COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX ) ; return { allowLeadingWildcards , queryStringOptions : JSON . parse ( queryStringOptions ) , ignoreFilterIfFieldNotInIndex , } ; }