Hello there
I am new to LevelDB, and exploring it since the project I started to work on is using it.
We have started hitting situations where we store too much data and I started looking into what we do at our application level.
String key = // generated from somewhere
String hashedKey = // encrypt key and save
mapDb.put(key, hashedKey)
decryptMapDb(hashKey, key)
Our key and hashedKey both are unique
The reason we put it there is application specific but we need to keep both key and hashedKey searchable. As we could see that we store same data twice to make sure we could search both ways.
I was looking for a way to reduce this storage if leveldb has a bi-directional search.
I started looking but the one I found was
BidiMap in Google Collections Library
Questions
- Is there a BiDirectionalMap so that I save my data just once?
- What are other alternatives/recommendations?
Thank you in advance
+ Harit Himanshu