http://tylerstroud.com/2014/11/18/storing-and-querying-objects-in-redis/ is a short treatise on the query expressivity of Redis, a popular K-V store.
For my purposes here, it convincingly argues for server-side Boolean operations over sorted keyrange results to allow efficient querying by multiple criteria.
Intersection is probably the most important such operation, followed by union and set difference.
A query paraphrased as “Give me all products under the Men’s trousers subsection of the category index and/intersected with the price index ranging from 30 - 100 Euro” might serve as a made-up e-commerce example to illustrate the utility of the idea.
If we follow the ‘simple indices’ data modelling pattern of FDB, with keys like
index/criterion1/object_id_1 = ‘’
index/criterionN/object_id_k = ‘’
it seems we want some kind of intersectingIterator for the most important Boolean operation. Arguments would be an array of RangeResults and some way to specify a tuple position where the key subpart to use for set intersection can be found (e.g. the last position in the sketched index keys above).
Or we make intersectingIterator self-composable: intersectingIterator(RangeResult, tuplePos) -> RangeResult.
The argument for doing this server-side would be to drastically reduce the number of intermediate results that need to be transmitted otherwise, i.e. when doing Boolean operations client-side.
Underlyingly, something like https://roaringbitmap.org/ might be used to implement this efficiently.
What do people think - is this truly needed, can it be efficiently emulated with the existing API, if not, what are the chances this will be added?