docs: def paginate_index(self, bucket, index, startkey, endkey=None,
                         max_results=1000, return_terms=None,
                         continuation=None, timeout=None, term_regex=None):
          """
          Iterates over a paginated index query. This is equivalent to calling
          :meth:`get_index` and then successively calling
          :meth:`~riak.client.index_page.IndexPage.next_page` until all
          results are exhausted.
  
          Because limiting the result set is necessary to invoke pagination,
          the ``max_results`` option has a default of ``1000``.
  
          :param bucket: the bucket whose index will be queried
          :type bucket: RiakBucket
          :param index: the index to query
          :type index: string
          :param startkey: the sole key to query, or beginning of the query range
          :type startkey: string, integer
          :param endkey: the end of the query range (optional if equality)
          :type endkey: string, integer
          :param return_terms: whether to include the secondary index value
          :type return_terms: boolean
          :param max_results: the maximum number of results to return (page
              size), defaults to 1000
          :type max_results: integer
          :param continuation: the opaque continuation returned from a
              previous paginated request
          :type continuation: string
          :param timeout: a timeout value in milliseconds, or 'infinity'
          :type timeout: int
          :param term_regex: a regular expression used to filter index terms
          :type term_regex: string
          :rtype: generator over instances of
            :class:`~riak.client.index_page.IndexPage`
  
          """
          page = self.get_index(bucket, index, startkey,
                                endkey=endkey, max_results=max_results,
                                return_terms=return_terms,
                                continuation=continuation,
                                timeout=timeout, term_regex=term_regex)
          yield page
          while page.has_next_page():
              page = page.next_page()
              yield page