SAFE currently just has a way to exactly get a value by the hash.
Since there is a structure to the network and how the keys are looked up, I was thinking it should be possible to utilize this to be able to get keys in a range somehow.
A pure key/value store only has support for getting a key by a hash. Column-stores typically allows you to have ordered keys.
There is really two things that would be very useful here. One is to have a method for getting all keys in a range, the other is to have a method for getting the n keys closest to a key.
These two methods would allow lots of new querying capabilities, semantic hashing, using SAFE more like a column-store rather than just key/value store. Space-filling curves can be used to take multiple values to construct keys where semantically close values will give similar keys. All in all, lots of interesting and useful querying capabilities could be built on top of this on the application layer.
These methods could be used for getting MDs and there should be a range of type tags that support this kind of queries, while type tags outside of this range would support only the standard get by key.
So the methods would be something like
GetMDKeysByRange(fromKey, toKey, typeTag)
GetClosestsMDKeys(key, numHits, typeTag)
I found a couple papers dealing with related topics.
Is there any reason something like this wouldn’t work?