import { OpenSearchQueryConfig } from './build_opensearch_query' ; import { GetConfigFn , UI_SETTINGS } from '../..' ; interface OpenSearchDashboardsConfig { get : GetConfigFn ; } export function getOpenSearchQueryConfig ( config ) { const allowLeadingWildcards = config . get ( UI_SETTINGS . QUERY_ALLOW_LEADING_WILDCARDS ) ; const queryStringOptions = config . get ( UI_SETTINGS . QUERY_STRING_OPTIONS ) ; const ignoreFilterIfFieldNotInIndex = config . get ( UI_SETTINGS . COURIER_IGNORE_FILTER_IF_FIELD_NOT_IN_INDEX ) ; const dateFormatTZ = config . get ( 'dateFormat:tz' ) ; return { allowLeadingWildcards , queryStringOptions , ignoreFilterIfFieldNotInIndex , dateFormatTZ , } as OpenSearchQueryConfig ; }