Open andcastillo opened 7 years ago
Why do you use countAndQueries and counter??? Is it not easier to push ???
if (req.swagger.params.kingdomName.value) { query.query.bool.must[countAndQueries] = { bool: { should: [] } }; let counter = 0; req.swagger.params.kingdomName.value.forEach((value) => { query.query.bool.must[countAndQueries].bool.should[counter] = { wildcard: { 'taxonomy.kingdom_name.exactWords': `*${value.toLowerCase()}*` } }; counter += 1; }); countAndQueries += 1; }
Why do you use countAndQueries and counter??? Is it not easier to push ???