Elasticsearch – how do i add `boost` to `constant_score` in bodybuilder?

I have the following bodybuilder query :- bodybuilder() .orQuery(‘match_all’, {}) .orQuery(‘constant_score’, null , (qr) => { return qr.filter(‘range’, ‘stock_sum’, {gte: 1}) }) .build() Which basically generate the following (Query simulator HERE) { "query": { "bool": { "should": [ { "match_all": {} }, { "constant_score": { "filter": { "range": { "stock_sum": { "gte": 1 } }… Read More Elasticsearch – how do i add `boost` to `constant_score` in bodybuilder?