bool static method

Map bool({
  1. dynamic must,
  2. dynamic filter,
  3. dynamic should,
  4. dynamic mustNot,
})

Implementation

static Map bool({
  dynamic must,
  dynamic filter,
  dynamic should,
  dynamic mustNot,
}) {
  return {
    'bool': {
      if (must != null) 'must': must,
      if (filter != null) 'filter': filter,
      if (should != null) 'should': should,
      if (mustNot != null) 'must_not': mustNot,
    }
  };
}