import { has } from 'lodash' ; import { Query } from 'src/plugins/data/public' ; param query return export function migrateLegacyQuery ( query ) { if ( ! has ( query , 'language' ) ) { return { query , language : 'lucene' } ; } return query as Query ; }