On Thursday, May 9, 2019 at 9:29:47 PM UTC+1, mathieu.lonjaret wrote: ... > Btw, I've just remembered two things: > 1) in the scanning cabinet we use camliPath:page_number to represent > the set of the scanned pages of a document. It's a bit like what you > want, except we indeed do not mutate the order. >
Right; this would work well for archival documents like document scans but less well for mutable collections like albums. > 2) In this thread, we were talking about another potential attribute, > i.e. camliPathOrder, but we never ended up actually using it. Maybe we > should revive it at some point. > https://groups.google.com/d/msg/camlistore/xApHFjJKn3M/dyYpJDDAjvgJ > This thread is really interesting. The camliPathOrder attribute would let you reorder by spacing out values and then using midpoints when things change. Floating points would be better for this since you wouldn't have to worry about picking the right spacing to begin with. Either way, this approach does limit the number of reorders, especially in pathological cases. Perhaps it could periodically be "repacked" somehow. The other approach mentioned seems to be building a singly/doubly linked list structure with "previous" and "next" attributes, which sounds plausible. But it makes me wonder if this could be done more simply by appending insert/move/delete operations to the permanode. E.g.: item_0: sha224-abc item_1: sha224-def item_2: sha224-ghi move:2:0 delete:1 insert:0:sha224-jkl The indexer would just run through these operations to reconstruct the final order: sha224-jkl sha224-ghi sha224-def Again, maybe periodic repacking checkpoints could limit the work the indexer needs to do after many operations are appended. Clearly I don't know exactly what this should look like, but would this kind of approach make any sense? ... -- You received this message because you are subscribed to the Google Groups "Perkeep" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/perkeep/48a21f79-5cb2-4609-b8f4-81ec91e6bf3f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
