code: def filter(self, f, operator="and"):
          
          if self._filtered:
              self._filter_dsl.filter(f)
          else:
              self._build_filtered_query(f, operator)
          return self
docs: Add a filter to the query
  
          Takes a Filter object, or a filterable DSL object.