digitalbazaar / edv-client

An Encrypted Data Vault Client
BSD 3-Clause "New" or "Revised" License
13 stars 9 forks source link

Bug: Multiple indexes on the same attribute overwrite each other #94

Closed dlongley closed 2 years ago

dlongley commented 2 years ago

A map structure that is keyed off of attribute is used here to store blinded values:

https://github.com/digitalbazaar/edv-client/blob/v10.0.0/IndexHelper.js#L113

But if an attribute appears in more than one index, only the last index value will be stored (overwriting the others). The map needs to allow for the storage of more than one value associated with an attribute (or something along those lines). Additionally, a test that adds multiple indexes, including compound indexes, involving the same attribute needs to be created that makes sure there is no regression once this is fixed.