import * as ast from '../ast' ; import { IIndexPattern , KueryNode } from '../../..' ; export function buildNodeParams ( children ) { return { arguments : children , } ; } export function toOpenSearchQuery ( node , indexPattern ? , config = { } , context = { } ) { const children = node . arguments || [ ] ; return { bool : { filter : children . map ( ( child ) => { return ast . toOpenSearchQuery ( child , indexPattern , config , context ) ; } ) , } , } ; }