Ok, but just so we're on the same page, I think Eric was talking about
using the update_seq for that document in the view (i.e., the key for
that document in _all_docs_by_seq), not the server's latest
update_seq. I don't think that usage violates any requirements of the
map function.
Yes that is correct.
Adam
I'd have to think harder on it. I'm pretty sure that you'd end up with
the same documents and different view output depending on the node you
were using.
I think so too: At least if that would be the case for the
_all_docs_by_seq, and I'm pretty sure it is. That is not a problem for
my use case, where we have only one particular node that will be running
the views for which I;d want to use the _seq.
You could almost fix it by transmitting 'dead' update_seq's
but that's a long road for the immediate question.
If I understand you correctly, that's partly what I'm doing now as a
solution to a different problem, but it's really the opposite of
elegant: To have a handle on when a document was first seen on the 'node
of interest' we have an update trigger write a sequence number (which is
approximate to the one the db was at on the when the document was first
seen there) into a 'first_seen' field. Doing the same for a
'last_modified' field would be worse, or even impossible, since writing
to that field would trigger the update trigger again.
--
- eric casteleijn
http://www.canonical.com