title: Nodejs: Create search query with reference collection field
body: <p>My User collection model schema:</p>
  
  <pre><code>var userModel = new Schema({
      userAddress: { type: Object, ref: 'useraddress' },
      name: String,
  });
  </code></pre>
  
  <p>My User addresses collection model schema:</p>
  
  <pre><code>var addressModel = new Schema({
      macAddress: String,
      repeat: Number,
  });
  </code></pre>
  
  <p>Get data method is:</p>
  
  <pre><code>module.exports.get = function (req, res) {
  var _repeatTime = 2;
  var _searchQRY = [];
  _searchQRY.push(
      {
          "useraddress.repeat": { $gte: _repeatTime}
      });
  userModel.find({ $and: _searchQRY }).populate('useraddress').exec(function (err, results) {
          res.json({ record: results})
      });
  </code></pre>
  
  <p>This is my code. I want to filter with address repeat number. But i am not getting correct result with this query.</p>