Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
})
// Match any terms.
esbResult = esbResult.filter(esb.termsQuery(filterName, filterVals))
// Match all terms.
// esbResult = esbResult.should(esb.termsQuery(filterName, filterVals))
// esbResult = esbResult.minimumShouldMatch(filterField.length)
} else {
let filterField = filter.values.slice()
esbResult = esbResult.filter(esb.termQuery(filterName, filterField))
}
break
case 'multiMatch':
esbResult = esbResult.must(esb.multiMatchQuery(filter.fields, filter.values))
break
case 'ids':
esbResult = esbResult.filter(esb.idsQuery(filter.fields, filter.values))
break
case 'integer':
esbResult = esbResult.filter(esb.rangeQuery(filterName)[operator](filter.values))
break
default:
}
}