code: def filter(self, search):
          '''
          Perform filtering instead of default post-filtering.
          '''
          if not self._filters:
              return search
          filters = Q('match_all')
          for f in self._filters.values():
              filters &= f
          return search.filter(filtersf filter(self, search):
          '''
          Perform filtering instead of default post-filtering.
          '''
          if not self._filters:
              return search
          filters = Q('match_all')
          for f in self._filters.values():
              filters &= f
          return search.filter(filters)
docs: Perform filtering instead of default post-filtering.