class_docstr: Aggregation request which can be passed to `Client.aggregate`.
class_docstr_tok: ["Aggregation","request","which","can","be","passed","to","`","Client.aggregate","`","."]
docstr: Specify filter for post-query results using predicates relating to
  values in the result set.
  
  ### Parameters
  
  - **fields**: Fields to group by. This can either be a single string,
      or a list of strings.
docstr_tok: ["Specify","filter","for","post-query","results","using","predicates","relating","to","values","in","the","result","set",".","#","#","#","Parameters","-","*","*","fields","*","*",":","Fields","to","group","by",".","This","can","either","be","a","single","string",",","or","a","list","of","strings","."]
code: def filter(
      self, expressions: Union[str, List[str]]
  ) -> "AggregateRequest":
      """
      Specify filter for post-query results using predicates relating to
      values in the result set.
  
      ### Parameters
  
      - **fields**: Fields to group by. This can either be a single string,
          or a list of strings.
      """
      if isinstance(expressions, str):
          expressions = [expressions]
  
      for expression in expressions:
          self._aggregateplan.extend(["FILTER", expression])
  
      return self
  
imports: from typing import List, Union
label_desc: Use image node_id 7 for calling the AggregateRequest obj's underlying member method code with example usage: obj.filter(expressions) and returns: self