import { Filter , FilterMeta } from './meta_filter' ; export type QueryStringFilterMeta = FilterMeta ; export type QueryStringFilter = Filter & { meta : QueryStringFilterMeta ; query ? : { query_string : { query : string ; } ; } ; } ; export const isQueryStringFilter = ( filter ) : filter is QueryStringFilter => filter && filter . query && filter . query . query_string ; export const buildQueryFilter = ( query , index , alias ) => ( { query , meta : { index , alias , } , } as QueryStringFilter ) ;