Skip to content

Commit

Permalink
fix: query performance on DocumentDB (#171)
Browse files Browse the repository at this point in the history
* fix: query performance on DocumentDB

* fix: oops
  • Loading branch information
chris13524 authored Feb 7, 2024
1 parent a610054 commit 660e06b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stores/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,10 @@ impl KeysPersistentStorage for MongoPersistentStorage {
async fn get_cacao_by_identity_key(&self, identity_key: &str) -> Result<Cacao, StoreError> {
info!("get_cacao_by_identity_key");
let filter = doc! {
"identities.identity_key": identity_key,
"identities.identity_key": {
"$exists": true, // https://docs.aws.amazon.com/documentdb/latest/developerguide/functional-differences.html#functional-differences.sparse-index
"$eq": identity_key,
},
};

info!("constructing not_found");
Expand Down

0 comments on commit 660e06b

Please sign in to comment.