import { isString } from 'lodash' ; import { DslQuery } from './opensearch_query_dsl' ; export function luceneStringToDsl ( query ) { if ( isString ( query ) ) { if ( query . trim ( ) === '' ) { return { match_all : { } } ; } return { query_string : { query } } ; } return query ; }