func (it *indexIterator) loadNextPage() (err error) {
	if it.page, err = it.index.Browse(it.params, it.cursor); err != nil {
		return
	}
	if len(it.page.Hits) == 0 {
		err = errors.New("No more hits")
		return
	}
	it.cursor = it.page.Cursor
	it.pos = 0
	return
}
loadNextPage is used internally to load the next page of results, using the
underlying Browse cursor.
package algoliasearch
import "errors"
type indexIterator struct {
	cursor string
	index  Index
	page   BrowseRes
	params Map
	pos    int
}
func newIndexIterator(index Index, params Map) (it *indexIterator, err error) {
	it = &indexIterator{
		cursor: "",
		index:  index,
		params: duplicateMap(params),
		pos:    0,
	}
	err = it.loadNextPage()
	return
}
func (it *indexIterator) Next() (res Map, err error) {
	if len(it.page.Hits) == 0 {
		err = errors.New("No more hits")
		return
	}
	if it.pos == len(it.page.Hits) {
		if it.cursor == "" {
			err = errors.New("No more hits")
		} else {
			err = it.loadNextPage()
		}
		if err != nil {
			return
		}
	}
	res = it.page.Hits[it.pos]
	it.pos++
	return
}