Skip to content

Instantly share code, notes, and snippets.

@nhc
Last active August 23, 2018 12:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nhc/7682dc614f0f1c1665eb42756eba85a0 to your computer and use it in GitHub Desktop.
Save nhc/7682dc614f0f1c1665eb42756eba85a0 to your computer and use it in GitHub Desktop.
This does not work
<?php
$number = 5000;
$filter['email_1'] = ['$exists' => 1];
$mongoRequest = new MongoRequest();
$mongoRequest->setFilter($filter);
$mongoRequest->setLimit($number);
$importContactModel = new ImportContactModel();
$importContacts = $importContactModel->find($mongoRequest);
$total = $importContactModel->count($mongoRequest);
@nhc
Copy link
Author

nhc commented Aug 23, 2018

If we take out line 9, all works perfectly. The query returns 176,000 documents no problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment