|
From: Doug C. <cu...@ap...> - 2008-04-02 15:49:14
|
Ning Li wrote: > On Mon, Mar 31, 2008 at 6:03 PM, Doug Cutting <cu...@ap...> wrote: >> The naive approach is simply to db.getDoc() and check the version, no? > > Yes. The current implementation does that. I was worried about > its performance because I thought db.getDoc() means retrieving > a full document. But you mentioned the semantics of retrieving > the outline of a document. That would work. It's time to have > db.getDoc(id) and db.getDoc(id, fields)? Maybe we need 'getVersion()' for this, that returns a special value for deleted documents? > Do we index a delete? No, but we need to log them, and, when replaying logs decide whether to execute them. If you delete a doc on one node and subsequently add it on another then, when the deletion is propagated to the former it should be ignored. But if you just delete it then the propagated delete should be executed. We distinguish the cases by comparing the version in the deletion log event to the version in the index -- just like for adds. Does that make sense? Doug |