Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

startkey & startkey_docid #353

Open
extemporalgenome opened this Issue · 0 comments

1 participant

@extemporalgenome

At the end of the third-to-last paragraph in the "Fast Paging (Do Use)" section on http://guide.couchdb.org/draft/recipes.html, the following is said:

"In addition to startkey and limit, you also use startkey_docid for pagination if, and only if, the extra row you fetch to find the next page has the same key as the current startkey."

It actually seems reasonable to use the startkey_docid parameter in just about any case, since, even if the 11th (in this case) document does not have the same key as the current startkey, it doesn't mean that document is the first with the new startkey.

To illustrate the point, if the current startkey is 'x', and the next startkey is 'y', yet documents 8, 9, and 10 of the current page are also keyed with 'y', then failing to specify a startkey_docid (even though the current and next startkeys differ), would result in the current document #8 being document #1 of the next page, which would be a rather common case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.