I am tracking user IP's by adding them to an array on the user document like so:
{
"_id": "LafnHzmQL6rBmXNxJ",
"name": "someuser",
"displayName": "SomeUser",
"knownIPs": ["1.1.1.1", "2.2.2.2", "3.3.3.3"]
}
How can I find any documents where any 1 of the knownIPs match any 1 of the knownIPs in another (without specifying a particular value) regardless of what the actual IP is.
The goal is to identify people who are using multiple accounts so they can be flagged programmatically for further inspection. I have over 40,000 users, will this be too intensive of an aggregation?