On Tue, 2008-11-25 at 12:20 +1100, Norberto Meijome wrote: > > Store the per-mailbox highest indexed UID in a new unique field created > > like "<user>/<uidvalidity>/<mailbox>". Always update it by deleting the > > old one first and then adding the new one. > > you mean delete, commit, add, commit? if you replace the record, simply > submitting the new document and committing would do (of course, you must > ensure > the value of the uniqueKey field matches, so SOLR replaces the old doc).
Oh, I thought it ignored the new document in that case. Sure, I'll then don't do the delete if it gets replaced anyway. > > So to find out the highest > > indexed UID for a mailbox just look it up using its unique field. For > > finding the highest indexed UID for a user's all mailboxes do a single > > query: > > > > - fl=highestuid > > - q=highestuid:[* TO *] > > - fq=user:<user> > > would it be faster to say q=user:<user> AND highestuid:[ * TO *] ? Now that I read again what fq really did, yes, sounds like you're right. > ( and i > guess you'd sort DESC and return 1 record only). No, I'd use the above for getting highestuid value for all mailboxes (there should be only one record per mailbox (each mailbox has separate uid values -> separate highestuid value)) so I can look at the returned highestuid values to see what mailboxes aren't fully indexed yet.
signature.asc
Description: This is a digitally signed message part