Closed ianconsolata closed 4 years ago
Not at all! Testing has actually gotten me thinking more about how this should work. Right now I think the delete functionality is a little weird and could result in the indexes getting out of sync. It currently only deletes things from the index based on the info provided. For example, if I give it only the id of a user, it will only delete the entry in the user index, not the email index, even if the object stored in the user index has an email attached. Does that make sense?
Happy to change the delete functionality so they stay in sync too if you think it's important. My basic approach would be to use the id / email provided, look it up in the first index, and then use the found user to look it up in the other index.
Oh hi Ian, I hadn't realised this was you. Great! Sorry, this PR had slipped through my inbox last month. I found it back today while cleaning up my https://github.com/pulls/review-requested.
Thanks for adding the unit test!
Thanks for this. We should catch up soon! :)
This index already exists, there is just no way to read from it.