Skip to content

Commit

Permalink
fix: query performance on DocumentDB
Browse files Browse the repository at this point in the history
  • Loading branch information
chris13524 committed Feb 7, 2024
1 parent a610054 commit 8cf63ba
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/stores/keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,10 @@ impl KeysPersistentStorage for MongoPersistentStorage {
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 8cf63ba

Please sign in to comment.