join leveldb documents based on common nested values