The index must be able to tell in which revision a particular triple pattern is contained.
For each triple in a revision compute a hash for:
- s p o
- s p _
- s _ o
- s _ _
- _ p o
- _ p _
- _ _ o
The hash points to all changesets containing respective triples.
To retrieve a particular triple pattern compute it's hash and retrieve all triples from the states.
!! Optimizations to apply !!