def search(self):
        """
        This should return an elasticsearch-DSL Search instance, list or
        queryset based on the values in self.cleaned_data.
        """
        results = self.index.objects.all()
        # reduce the results based on the q field
        if self.cleaned_data.get("q"):
            results = results.query(
                "multi_match",
                query=self.cleaned_data['q'],
                fields=self.get_fields(),
                # this prevents ES from erroring out when a string is used on a
                # number field (for example)
                lenient=True
            )

        return results
This should return an elasticsearch-DSL Search instance, list or
        queryset based on the values in self.cleaned_data.