Closed

Description
The KeyStore schema uses multiple indexing which only works if you are using those individual fields to query in the db. So, findforKey
and find
in src/database/repository/KeystoreRepo.ts
will not use the index currently defined.
Inorder to fix this, you need to make two indexes:
- For
findforKey
which uses compound indexing{ client: 1, primaryKey: 1 }
- For
find
which uses compound indexing{ client: 1, primaryKey: 1, secondaryKey: 1 }
This is how the Keystore
schema should have been indexed.
I am willing to create a pull a request for this change. Please acknowledge. 😃