If I understand correctly, you want to paginate a collection of
documents that may have a non-unique value uniquely.
At the moment, the best way to do this is to perform a standard query
and then filter for uniqueness on the application level. You could
also have a separate collection that stores the values uniquely, but,
as you've said, this isn't ideal.
I'd recommend adding a feature request at
jira.mongodb.org to add
distinct capability to a cursor.
Kyle