We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Searching a queryset of a specific page class with a child_of/descendant_of filter gives error
Searching on a specific page class with the `child_of`/`descendant_of` filter applied, gives the following error:

```
FieldError at /videos/

Cannot filter search results with field "page_ptr_id". Please add index.FilterField('page_ptr_id') to VideoPage.search_fields.
```

Here's an example query that causes this:

``` python
VideoPage.objects.child_of(parent_page).search("foo")
```

It seems to be a combination of a specific queryset and `child_of`/`descendant_of` filter that causes the issue as the following query (which uses the generic page model) works.

``` python
Page.objects.child_of(parent_page).type(VideoPage).search("foo")
```


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `wagtail/wagtailsearch/backends/base.py`
Content:
```
1 
2 from django.db.models.query import QuerySet
3 from django.db.models.lookups import Lookup
4 from django.db.models.sql.where import SubqueryConstraint, WhereNode
5 from django.utils.six import text_type
6 
7 from wagtail.wagtailsearch.index import class_is_indexed
8 
9 
10 class FilterError(Exception):
11     pass
12 
13 
14 class FieldError(Exception):
15     pass
16 
17 
18 class BaseSearchQuery(object):
19     DEFAULT_OPERATOR = 'or'
20 
21     def __init__(self, queryset, query_string, fields=None, operator=None, order_by_relevance=True):
22         self.queryset = queryset
23         self.query_string = query_string
24         self.fields = fields
25         self.operator = operator or self.DEFAULT_OPERATOR
26         self.order_by_relevance = order_by_relevance
27 
28     def _get_searchable_field(self, field_attname):
29         # Get field
30         field = dict(
31             (field.get_attname(self.queryset.model), field)
32             for field in self.queryset.model.get_searchable_search_fields()
33         ).get(field_attname, None)
34 
35         return field
36 
37     def _get_filterable_field(self, field_attname):
38         # Get field
39         field = dict(
40             (field.get_attname(self.queryset.model), field)
41             for field in self.queryset.model.get_filterable_search_fields()
42         ).get(field_attname, None)
43 
44         return field
45 
46     def _process_lookup(self, field, lookup, value):
47         raise NotImplementedError
48 
49     def _connect_filters(self, filters, connector, negated):
50         raise NotImplementedError
51 
52     def _process_filter(self, field_attname, lookup, value):
53         # Get the field
54         field = self._get_filterable_field(field_attname)
55 
56         if field is None:
57             raise FieldError('Cannot filter search results with field "' + field_attname + '". Please add index.FilterField(\'' + field_attname + '\') to ' + self.queryset.model.__name__ + '.search_fields.')
58 
59         # Process the lookup
60         result = self._process_lookup(field, lookup, value)
61 
62         if result is None:
63             raise FilterError('Could not apply filter on search results: "' + field_attname + '__' + lookup + ' = ' + text_type(value) + '". Lookup "' + lookup + '"" not recognosed.')
64 
65         return result
66 
67     def _get_filters_from_where_node(self, where_node):
68         # Check if this is a leaf node
69         if isinstance(where_node, Lookup):
70             field_attname = where_node.lhs.target.attname
71             lookup = where_node.lookup_name
72             value = where_node.rhs
73 
74             # Process the filter
75             return self._process_filter(field_attname, lookup, value)
76 
77         elif isinstance(where_node, SubqueryConstraint):
78             raise FilterError('Could not apply filter on search results: Subqueries are not allowed.')
79 
80         elif isinstance(where_node, WhereNode):
81             # Get child filters
82             connector = where_node.connector
83             child_filters = [self._get_filters_from_where_node(child) for child in where_node.children]
84             child_filters = [child_filter for child_filter in child_filters if child_filter]
85 
86             return self._connect_filters(child_filters, connector, where_node.negated)
87 
88         else:
89             raise FilterError('Could not apply filter on search results: Unknown where node: ' + str(type(where_node)))
90 
91     def _get_filters_from_queryset(self):
92         return self._get_filters_from_where_node(self.queryset.query.where)
93 
94 
95 class BaseSearchResults(object):
96     def __init__(self, backend, query, prefetch_related=None):
97         self.backend = backend
98         self.query = query
99         self.prefetch_related = prefetch_related
100         self.start = 0
101         self.stop = None
102         self._results_cache = None
103         self._count_cache = None
104 
105     def _set_limits(self, start=None, stop=None):
106         if stop is not None:
107             if self.stop is not None:
108                 self.stop = min(self.stop, self.start + stop)
109             else:
110                 self.stop = self.start + stop
111 
112         if start is not None:
113             if self.stop is not None:
114                 self.start = min(self.stop, self.start + start)
115             else:
116                 self.start = self.start + start
117 
118     def _clone(self):
119         klass = self.__class__
120         new = klass(self.backend, self.query, prefetch_related=self.prefetch_related)
121         new.start = self.start
122         new.stop = self.stop
123         return new
124 
125     def _do_search(self):
126         raise NotImplementedError
127 
128     def _do_count(self):
129         raise NotImplementedError
130 
131     def results(self):
132         if self._results_cache is None:
133             self._results_cache = self._do_search()
134         return self._results_cache
135 
136     def count(self):
137         if self._count_cache is None:
138             if self._results_cache is not None:
139                 self._count_cache = len(self._results_cache)
140             else:
141                 self._count_cache = self._do_count()
142         return self._count_cache
143 
144     def __getitem__(self, key):
145         new = self._clone()
146 
147         if isinstance(key, slice):
148             # Set limits
149             start = int(key.start) if key.start else None
150             stop = int(key.stop) if key.stop else None
151             new._set_limits(start, stop)
152 
153             # Copy results cache
154             if self._results_cache is not None:
155                 new._results_cache = self._results_cache[key]
156 
157             return new
158         else:
159             if self._results_cache is not None:
160                 return self._results_cache[key]
161 
162             new.start = self.start + key
163             new.stop = self.start + key + 1
164             return list(new)[0]
165 
166     def __iter__(self):
167         return iter(self.results())
168 
169     def __len__(self):
170         return len(self.results())
171 
172     def __repr__(self):
173         data = list(self[:21])
174         if len(data) > 20:
175             data[-1] = "...(remaining elements truncated)..."
176         return repr(data)
177 
178 
179 class BaseSearch(object):
180     search_query_class = None
181     search_results_class = None
182 
183     def __init__(self, params):
184         pass
185 
186     def get_rebuilder(self):
187         return None
188 
189     def reset_index(self):
190         raise NotImplementedError
191 
192     def add_type(self, model):
193         raise NotImplementedError
194 
195     def refresh_index(self):
196         raise NotImplementedError
197 
198     def add(self, obj):
199         raise NotImplementedError
200 
201     def add_bulk(self, model, obj_list):
202         raise NotImplementedError
203 
204     def delete(self, obj):
205         raise NotImplementedError
206 
207     def search(self, query_string, model_or_queryset, fields=None, filters=None, prefetch_related=None, operator=None, order_by_relevance=True):
208         # Find model/queryset
209         if isinstance(model_or_queryset, QuerySet):
210             model = model_or_queryset.model
211             queryset = model_or_queryset
212         else:
213             model = model_or_queryset
214             queryset = model_or_queryset.objects.all()
215 
216         # Model must be a class that is in the index
217         if not class_is_indexed(model):
218             return []
219 
220         # Check that theres still a query string after the clean up
221         if query_string == "":
222             return []
223 
224         # Apply filters to queryset
225         if filters:
226             queryset = queryset.filter(**filters)
227 
228         # Prefetch related
229         if prefetch_related:
230             for prefetch in prefetch_related:
231                 queryset = queryset.prefetch_related(prefetch)
232 
233         # Check operator
234         if operator is not None:
235             operator = operator.lower()
236             if operator not in ['or', 'and']:
237                 raise ValueError("operator must be either 'or' or 'and'")
238 
239         # Search
240         search_query = self.search_query_class(queryset, query_string, fields=fields, operator=operator, order_by_relevance=order_by_relevance)
241         return self.search_results_class(self, search_query)
242
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/wagtail/wagtailsearch/backends/base.py b/wagtail/wagtailsearch/backends/base.py
--- a/wagtail/wagtailsearch/backends/base.py
+++ b/wagtail/wagtailsearch/backends/base.py
@@ -71,6 +71,10 @@
             lookup = where_node.lookup_name
             value = where_node.rhs
 
+            # Ignore pointer fields that show up in specific page type queries
+            if field_attname.endswith('_ptr_id'):
+                return
+
             # Process the filter
             return self._process_filter(field_attname, lookup, value)

{"golden_diff": "diff --git a/wagtail/wagtailsearch/backends/base.py b/wagtail/wagtailsearch/backends/base.py\n--- a/wagtail/wagtailsearch/backends/base.py\n+++ b/wagtail/wagtailsearch/backends/base.py\n@@ -71,6 +71,10 @@\n             lookup = where_node.lookup_name\n             value = where_node.rhs\n \n+            # Ignore pointer fields that show up in specific page type queries\n+            if field_attname.endswith('_ptr_id'):\n+                return\n+\n             # Process the filter\n             return self._process_filter(field_attname, lookup, value)\n", "issue": "Searching a queryset of a specific page class with a child_of/descendant_of filter gives error\nSearching on a specific page class with the `child_of`/`descendant_of` filter applied, gives the following error:\n\n```\nFieldError at /videos/\n\nCannot filter search results with field \"page_ptr_id\". Please add index.FilterField('page_ptr_id') to VideoPage.search_fields.\n```\n\nHere's an example query that causes this:\n\n``` python\nVideoPage.objects.child_of(parent_page).search(\"foo\")\n```\n\nIt seems to be a combination of a specific queryset and `child_of`/`descendant_of` filter that causes the issue as the following query (which uses the generic page model) works.\n\n``` python\nPage.objects.child_of(parent_page).type(VideoPage).search(\"foo\")\n```\n\n", "before_files": [{"content": "\nfrom django.db.models.query import QuerySet\nfrom django.db.models.lookups import Lookup\nfrom django.db.models.sql.where import SubqueryConstraint, WhereNode\nfrom django.utils.six import text_type\n\nfrom wagtail.wagtailsearch.index import class_is_indexed\n\n\nclass FilterError(Exception):\n    pass\n\n\nclass FieldError(Exception):\n    pass\n\n\nclass BaseSearchQuery(object):\n    DEFAULT_OPERATOR = 'or'\n\n    def __init__(self, queryset, query_string, fields=None, operator=None, order_by_relevance=True):\n        self.queryset = queryset\n        self.query_string = query_string\n        self.fields = fields\n        self.operator = operator or self.DEFAULT_OPERATOR\n        self.order_by_relevance = order_by_relevance\n\n    def _get_searchable_field(self, field_attname):\n        # Get field\n        field = dict(\n            (field.get_attname(self.queryset.model), field)\n            for field in self.queryset.model.get_searchable_search_fields()\n        ).get(field_attname, None)\n\n        return field\n\n    def _get_filterable_field(self, field_attname):\n        # Get field\n        field = dict(\n            (field.get_attname(self.queryset.model), field)\n            for field in self.queryset.model.get_filterable_search_fields()\n        ).get(field_attname, None)\n\n        return field\n\n    def _process_lookup(self, field, lookup, value):\n        raise NotImplementedError\n\n    def _connect_filters(self, filters, connector, negated):\n        raise NotImplementedError\n\n    def _process_filter(self, field_attname, lookup, value):\n        # Get the field\n        field = self._get_filterable_field(field_attname)\n\n        if field is None:\n            raise FieldError('Cannot filter search results with field \"' + field_attname + '\". Please add index.FilterField(\\'' + field_attname + '\\') to ' + self.queryset.model.__name__ + '.search_fields.')\n\n        # Process the lookup\n        result = self._process_lookup(field, lookup, value)\n\n        if result is None:\n            raise FilterError('Could not apply filter on search results: \"' + field_attname + '__' + lookup + ' = ' + text_type(value) + '\". Lookup \"' + lookup + '\"\" not recognosed.')\n\n        return result\n\n    def _get_filters_from_where_node(self, where_node):\n        # Check if this is a leaf node\n        if isinstance(where_node, Lookup):\n            field_attname = where_node.lhs.target.attname\n            lookup = where_node.lookup_name\n            value = where_node.rhs\n\n            # Process the filter\n            return self._process_filter(field_attname, lookup, value)\n\n        elif isinstance(where_node, SubqueryConstraint):\n            raise FilterError('Could not apply filter on search results: Subqueries are not allowed.')\n\n        elif isinstance(where_node, WhereNode):\n            # Get child filters\n            connector = where_node.connector\n            child_filters = [self._get_filters_from_where_node(child) for child in where_node.children]\n            child_filters = [child_filter for child_filter in child_filters if child_filter]\n\n            return self._connect_filters(child_filters, connector, where_node.negated)\n\n        else:\n            raise FilterError('Could not apply filter on search results: Unknown where node: ' + str(type(where_node)))\n\n    def _get_filters_from_queryset(self):\n        return self._get_filters_from_where_node(self.queryset.query.where)\n\n\nclass BaseSearchResults(object):\n    def __init__(self, backend, query, prefetch_related=None):\n        self.backend = backend\n        self.query = query\n        self.prefetch_related = prefetch_related\n        self.start = 0\n        self.stop = None\n        self._results_cache = None\n        self._count_cache = None\n\n    def _set_limits(self, start=None, stop=None):\n        if stop is not None:\n            if self.stop is not None:\n                self.stop = min(self.stop, self.start + stop)\n            else:\n                self.stop = self.start + stop\n\n        if start is not None:\n            if self.stop is not None:\n                self.start = min(self.stop, self.start + start)\n            else:\n                self.start = self.start + start\n\n    def _clone(self):\n        klass = self.__class__\n        new = klass(self.backend, self.query, prefetch_related=self.prefetch_related)\n        new.start = self.start\n        new.stop = self.stop\n        return new\n\n    def _do_search(self):\n        raise NotImplementedError\n\n    def _do_count(self):\n        raise NotImplementedError\n\n    def results(self):\n        if self._results_cache is None:\n            self._results_cache = self._do_search()\n        return self._results_cache\n\n    def count(self):\n        if self._count_cache is None:\n            if self._results_cache is not None:\n                self._count_cache = len(self._results_cache)\n            else:\n                self._count_cache = self._do_count()\n        return self._count_cache\n\n    def __getitem__(self, key):\n        new = self._clone()\n\n        if isinstance(key, slice):\n            # Set limits\n            start = int(key.start) if key.start else None\n            stop = int(key.stop) if key.stop else None\n            new._set_limits(start, stop)\n\n            # Copy results cache\n            if self._results_cache is not None:\n                new._results_cache = self._results_cache[key]\n\n            return new\n        else:\n            if self._results_cache is not None:\n                return self._results_cache[key]\n\n            new.start = self.start + key\n            new.stop = self.start + key + 1\n            return list(new)[0]\n\n    def __iter__(self):\n        return iter(self.results())\n\n    def __len__(self):\n        return len(self.results())\n\n    def __repr__(self):\n        data = list(self[:21])\n        if len(data) > 20:\n            data[-1] = \"...(remaining elements truncated)...\"\n        return repr(data)\n\n\nclass BaseSearch(object):\n    search_query_class = None\n    search_results_class = None\n\n    def __init__(self, params):\n        pass\n\n    def get_rebuilder(self):\n        return None\n\n    def reset_index(self):\n        raise NotImplementedError\n\n    def add_type(self, model):\n        raise NotImplementedError\n\n    def refresh_index(self):\n        raise NotImplementedError\n\n    def add(self, obj):\n        raise NotImplementedError\n\n    def add_bulk(self, model, obj_list):\n        raise NotImplementedError\n\n    def delete(self, obj):\n        raise NotImplementedError\n\n    def search(self, query_string, model_or_queryset, fields=None, filters=None, prefetch_related=None, operator=None, order_by_relevance=True):\n        # Find model/queryset\n        if isinstance(model_or_queryset, QuerySet):\n            model = model_or_queryset.model\n            queryset = model_or_queryset\n        else:\n            model = model_or_queryset\n            queryset = model_or_queryset.objects.all()\n\n        # Model must be a class that is in the index\n        if not class_is_indexed(model):\n            return []\n\n        # Check that theres still a query string after the clean up\n        if query_string == \"\":\n            return []\n\n        # Apply filters to queryset\n        if filters:\n            queryset = queryset.filter(**filters)\n\n        # Prefetch related\n        if prefetch_related:\n            for prefetch in prefetch_related:\n                queryset = queryset.prefetch_related(prefetch)\n\n        # Check operator\n        if operator is not None:\n            operator = operator.lower()\n            if operator not in ['or', 'and']:\n                raise ValueError(\"operator must be either 'or' or 'and'\")\n\n        # Search\n        search_query = self.search_query_class(queryset, query_string, fields=fields, operator=operator, order_by_relevance=order_by_relevance)\n        return self.search_results_class(self, search_query)\n", "path": "wagtail/wagtailsearch/backends/base.py"}], "after_files": [{"content": "\nfrom django.db.models.query import QuerySet\nfrom django.db.models.lookups import Lookup\nfrom django.db.models.sql.where import SubqueryConstraint, WhereNode\nfrom django.utils.six import text_type\n\nfrom wagtail.wagtailsearch.index import class_is_indexed\n\n\nclass FilterError(Exception):\n    pass\n\n\nclass FieldError(Exception):\n    pass\n\n\nclass BaseSearchQuery(object):\n    DEFAULT_OPERATOR = 'or'\n\n    def __init__(self, queryset, query_string, fields=None, operator=None, order_by_relevance=True):\n        self.queryset = queryset\n        self.query_string = query_string\n        self.fields = fields\n        self.operator = operator or self.DEFAULT_OPERATOR\n        self.order_by_relevance = order_by_relevance\n\n    def _get_searchable_field(self, field_attname):\n        # Get field\n        field = dict(\n            (field.get_attname(self.queryset.model), field)\n            for field in self.queryset.model.get_searchable_search_fields()\n        ).get(field_attname, None)\n\n        return field\n\n    def _get_filterable_field(self, field_attname):\n        # Get field\n        field = dict(\n            (field.get_attname(self.queryset.model), field)\n            for field in self.queryset.model.get_filterable_search_fields()\n        ).get(field_attname, None)\n\n        return field\n\n    def _process_lookup(self, field, lookup, value):\n        raise NotImplementedError\n\n    def _connect_filters(self, filters, connector, negated):\n        raise NotImplementedError\n\n    def _process_filter(self, field_attname, lookup, value):\n        # Get the field\n        field = self._get_filterable_field(field_attname)\n\n        if field is None:\n            raise FieldError('Cannot filter search results with field \"' + field_attname + '\". Please add index.FilterField(\\'' + field_attname + '\\') to ' + self.queryset.model.__name__ + '.search_fields.')\n\n        # Process the lookup\n        result = self._process_lookup(field, lookup, value)\n\n        if result is None:\n            raise FilterError('Could not apply filter on search results: \"' + field_attname + '__' + lookup + ' = ' + text_type(value) + '\". Lookup \"' + lookup + '\"\" not recognosed.')\n\n        return result\n\n    def _get_filters_from_where_node(self, where_node):\n        # Check if this is a leaf node\n        if isinstance(where_node, Lookup):\n            field_attname = where_node.lhs.target.attname\n            lookup = where_node.lookup_name\n            value = where_node.rhs\n\n            # Ignore pointer fields that show up in specific page type queries\n            if field_attname.endswith('_ptr_id'):\n                return\n\n            # Process the filter\n            return self._process_filter(field_attname, lookup, value)\n\n        elif isinstance(where_node, SubqueryConstraint):\n            raise FilterError('Could not apply filter on search results: Subqueries are not allowed.')\n\n        elif isinstance(where_node, WhereNode):\n            # Get child filters\n            connector = where_node.connector\n            child_filters = [self._get_filters_from_where_node(child) for child in where_node.children]\n            child_filters = [child_filter for child_filter in child_filters if child_filter]\n\n            return self._connect_filters(child_filters, connector, where_node.negated)\n\n        else:\n            raise FilterError('Could not apply filter on search results: Unknown where node: ' + str(type(where_node)))\n\n    def _get_filters_from_queryset(self):\n        return self._get_filters_from_where_node(self.queryset.query.where)\n\n\nclass BaseSearchResults(object):\n    def __init__(self, backend, query, prefetch_related=None):\n        self.backend = backend\n        self.query = query\n        self.prefetch_related = prefetch_related\n        self.start = 0\n        self.stop = None\n        self._results_cache = None\n        self._count_cache = None\n\n    def _set_limits(self, start=None, stop=None):\n        if stop is not None:\n            if self.stop is not None:\n                self.stop = min(self.stop, self.start + stop)\n            else:\n                self.stop = self.start + stop\n\n        if start is not None:\n            if self.stop is not None:\n                self.start = min(self.stop, self.start + start)\n            else:\n                self.start = self.start + start\n\n    def _clone(self):\n        klass = self.__class__\n        new = klass(self.backend, self.query, prefetch_related=self.prefetch_related)\n        new.start = self.start\n        new.stop = self.stop\n        return new\n\n    def _do_search(self):\n        raise NotImplementedError\n\n    def _do_count(self):\n        raise NotImplementedError\n\n    def results(self):\n        if self._results_cache is None:\n            self._results_cache = self._do_search()\n        return self._results_cache\n\n    def count(self):\n        if self._count_cache is None:\n            if self._results_cache is not None:\n                self._count_cache = len(self._results_cache)\n            else:\n                self._count_cache = self._do_count()\n        return self._count_cache\n\n    def __getitem__(self, key):\n        new = self._clone()\n\n        if isinstance(key, slice):\n            # Set limits\n            start = int(key.start) if key.start else None\n            stop = int(key.stop) if key.stop else None\n            new._set_limits(start, stop)\n\n            # Copy results cache\n            if self._results_cache is not None:\n                new._results_cache = self._results_cache[key]\n\n            return new\n        else:\n            if self._results_cache is not None:\n                return self._results_cache[key]\n\n            new.start = self.start + key\n            new.stop = self.start + key + 1\n            return list(new)[0]\n\n    def __iter__(self):\n        return iter(self.results())\n\n    def __len__(self):\n        return len(self.results())\n\n    def __repr__(self):\n        data = list(self[:21])\n        if len(data) > 20:\n            data[-1] = \"...(remaining elements truncated)...\"\n        return repr(data)\n\n\nclass BaseSearch(object):\n    search_query_class = None\n    search_results_class = None\n\n    def __init__(self, params):\n        pass\n\n    def get_rebuilder(self):\n        return None\n\n    def reset_index(self):\n        raise NotImplementedError\n\n    def add_type(self, model):\n        raise NotImplementedError\n\n    def refresh_index(self):\n        raise NotImplementedError\n\n    def add(self, obj):\n        raise NotImplementedError\n\n    def add_bulk(self, model, obj_list):\n        raise NotImplementedError\n\n    def delete(self, obj):\n        raise NotImplementedError\n\n    def search(self, query_string, model_or_queryset, fields=None, filters=None, prefetch_related=None, operator=None, order_by_relevance=True):\n        # Find model/queryset\n        if isinstance(model_or_queryset, QuerySet):\n            model = model_or_queryset.model\n            queryset = model_or_queryset\n        else:\n            model = model_or_queryset\n            queryset = model_or_queryset.objects.all()\n\n        # Model must be a class that is in the index\n        if not class_is_indexed(model):\n            return []\n\n        # Check that theres still a query string after the clean up\n        if query_string == \"\":\n            return []\n\n        # Apply filters to queryset\n        if filters:\n            queryset = queryset.filter(**filters)\n\n        # Prefetch related\n        if prefetch_related:\n            for prefetch in prefetch_related:\n                queryset = queryset.prefetch_related(prefetch)\n\n        # Check operator\n        if operator is not None:\n            operator = operator.lower()\n            if operator not in ['or', 'and']:\n                raise ValueError(\"operator must be either 'or' or 'and'\")\n\n        # Search\n        search_query = self.search_query_class(queryset, query_string, fields=fields, operator=operator, order_by_relevance=order_by_relevance)\n        return self.search_results_class(self, search_query)\n", "path": "wagtail/wagtailsearch/backends/base.py"}]}