import { decorateQuery } from './decorate_query' ; import { luceneStringToDsl } from './lucene_string_to_dsl' ; import { Query } from '../../query/types' ; export function buildQueryFromLucene ( queries , queryStringOptions , dateFormatTZ ? ) { const combinedQueries = ( queries || [ ] ) . map ( ( query ) => { const queryDsl = luceneStringToDsl ( query . query ) ; return decorateQuery ( queryDsl , queryStringOptions , dateFormatTZ ) ; } ) ; return { must : combinedQueries , filter : [ ] , should : [ ] , must_not : [ ] , } ; }