symfony - Query builder mongodb index datetime -
i'm looking execute custome query doctrine odm in fulltext search , datetime range
indexes generated on mongodb
here code :
$search = $dm->createquerybuilder('videobundle:video'); if (isset($_post['date'])) { $from = new \datetime($_post['date']); $to = new \datetime('today'); $search->field('published')->range($from, $to); } $search->expr()->operator('$text', array( '$search' => $_post['searchvideo'], )); $search->limit(50); $query = $search->getquery(); $search = $query->execute();
query returned , executed doctrine mongodb in symfony profiler :
db.video.find().limit(50);
any help?
Comments
Post a Comment