My question is akin to Data structure for partial multi-keys mapping?.
I have key-value pairs where the key is composed of three components (strings).
I am looking for a data structure the can efficiently perform search queries over keys, where the queries could be complete or partial specification the key (one or more components omitted). For example:
(x, y, z)
(x, *, *)
(*, y, *)
etc.
The unspecified part of the key can be either at the front, the middle or the end of the key.
My current implementation (a hash map which maps all possible partial keys to a set of values that match this partial key) is horribly slow when inserting, deleting and updating values.