title: Exclude user in match MongoDB
body: <p>I want to add Not in query. but unfortunately I'm not getting the required result. i want to get result where user is not equal to userid. But I'm confused as to how I can add that. I tried multiple scenarios but failed. </p>
  
  <pre><code>server.get('/myFeedback', (req, res) =&gt; {
              var userid = req.query.userID;
              //console.log(req.query);
          db.collection("tweetsWithSentimentFeedback").aggregate( [
                                {
                                  $group: {
                                     _id: {
                                          topic: "$topic",
                                          group : "$group",
                                          type : "$type", 
                                          user    :   "$userName"
                                     },
                                     count: { $sum: 1 }    
                                    }
                                },{    $group: {
                                      _id: {
                                          topic: "$_id.topic",
                                          group : "$_id.group",
  
                                          },
                                      typeAndCount: {
                                          $addToSet: {
                                              type: "$_id.type",
                                              count: "$count"
                                          }
                                      },
                                      userName: {
                                          $addToSet: {
                                              user: "$_id.userName"
                                          }
                                      },
                                      totalCount: {
                                          $sum: "$count"
                                      }
                                  }
                        },
                        { $match: { $and: [ { totalCount: { $gt: 0, $lt: 15 } }, {userEqual: { $ne: [ "$userName.user", userid ] }} ] } },
                              // Then sort
                                 { "$sort": { "totalCount": -1 } }
                             ], (err, result) =&gt; {
                                 if (err) {
                                     console.log(err);
                                 }
                                 res.status(200).send(result);
                             } );
      });
  </code></pre>