We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 064a028 commit cc7cd52Copy full SHA for cc7cd52
readthedocs/search/api.py
@@ -60,7 +60,14 @@ class SearchPagination(PageNumberPagination):
60
max_page_size = 100
61
62
def paginate_queryset(self, queryset, request, view=None):
63
- """Override to get the paginated result from the ES queryset."""
+ """
64
+ Override to get the paginated result from the ES queryset.
65
+
66
+ This makes use of our custom paginator and slicing support from the ES DSL object,
67
+ instead of the one used by django's ORM.
68
69
+ Mostly inspired by https://github.com/encode/django-rest-framework/blob/acbd9d8222e763c7f9c7dc2de23c430c702e06d4/rest_framework/pagination.py#L191 # noqa
70
71
# Needed for other methods of this class.
72
self.request = request
73
0 commit comments