Indexing Time


Dave Warnock and I have been talking about indexing entries in Leonardo by last updated time.

We want to be able to retrieve the entries between A and B, or the n entries after A or the n entries before B where A and B can be either ordinals or times.

I'm guessing the right way of doing it would be some sort of balanced tree.

The nature of the data is that insertions will almost entirely be at the end, retrieval will largely be at the end and deletions will probably be fairly distributed.

Just as a preliminary, I've written an unbalanced tree, although I haven't finished implementing the kinds of queries we want to be able to do on the tree.

Any suggestions on algorithms and/or implementations in Python?

Most implementations don't seem to come out of the box with the kind of "slice" queries we want to do (or even both key- and ordinal-based queries).

The original post was in the categories: python leonardo algorithms but I'm still in the process of migrating categories over.

The original post had 1 comment I'm in the process of migrating over.