I have a collection of usernames that map to their character ids. App allows users to search by username, when username is submitted I get the document from firestore and check if it exists or not.
Right now there are no limits to how fast users can query usernames. Ideally I want to allow to query this collection once every 2s per user.
I was able to find this answer https://stackoverflow.com/a/56487579/911930 but if I understood security rules correctly this example imposes "Global" delay on the collection i.e. if user no.1 queries usernames, user no.2 can't query them for 5s. This is obv not ideal for my use case, as I want this rule imposed per user as opposed to globally.
Is this achievable with security rules?