code: function Search(event, esClient) {
    var params = {}
  
    if (_.has(event, 'query') && !_.isEmpty(event.query)) {
      params = event.query
    } else if (_.has(event, 'body') && !_.isEmpty(event.body)) {
      params = event.body
    }
  
    this.headers = event.headers
  
    // AOI Coverage
    /*this.aoiCoverage = null;
    if (_.has(params, 'coverage')) {
      this.aoiCoverage = params['coverage']
      params = _.omit(params, ['coverage'])
    }*/
  
    this.merge = false
    if (_.has(params, 'merge')) {
      this.merge = params['merge']
      params = _.omit(params, ['merge'])
    }  
  
    // get page number
    this.page = parseInt((params.page) ? params.page : 1)
  
    this.params = params
    console.log('Search parameters:', params)
  
    this.size = parseInt((params.limit) ? params.limit : 1)
    this.frm = (this.page - 1) * this.size
    this.client = esClient
  
    this.queries = queries(this.params)
  
    console.log(`Queries: ${JSON.stringify(this.queries)}`)
  }
docs: Search class