title: Cloud Firestore Security Rule exists() doesn't work
body: <p>As shown below, I want to set up a security rule when a user exists in the "users" node, the user can access the "email" node. Meeting the case, I used builtin exists() function but it doesn't seem working correctly. I've just been getting "Missing or insufficient permissions." Just in case, the user exists under the "users" node for sure.</p>
  
  <p>This issue still occurs when using the get() function, where incorporating this issue(<a href="https://stackoverflow.com/questions/46629170/firestore-security-rule-get-not-work">Firestore security rule get() not work</a>)</p>
  
  <p>I'm totally not sure why this rule doesn't work. Would be appreciated if you could give me any help.</p>
  
  <pre><code>service cloud.firestore { 
    match /databases/{database}/documents {
      match /emails/{email} {
        allow read, write: if exists(/databases/$(database)/documents/users/$(request.auth.uid));
      }
  
      match /users/{userId} {
        allow read, write: if request.auth != null;
      }
    }
  }
  </code></pre>