I've realised there's something missing from Phalcon's ODM. But that's not too bad, thankfully, it's easy to implement yourself.
Basically, in the \MongoCollection class you've got the method `ensureIndex()` which adds (or rather ensures) that your indexes exist.
Phalcon doesn't seem to have this (or if it does then I haven't found it).
I've just rolled my own way of doing this, and hopefully it helps someone out there.
To ensureIndex in the Phalcon ODM, I'm currently using:
PHP Code:
<?php
namespace My\ObjectNamespace;
class MyObject extends \Phalcon\Mvc\Collection
{
    public function ensureIndex()
    {
        // Get the raw \MongoDB Connection
        $connection = $this->getConnection();
        // Get the \MongoCollection connection (with added dynamic collection name (thanks Phalcon))
        $collection = $connection->selectCollection($this->getSource());
        // One index.
        $collection->ensureIndex(
            array('created' => -1)
        );
        // A unique index
        $collection->ensureIndex(
            array('name' => 1),
            array('unique' => true)
        );
    }
}
That's it. I've tied my Indexes into the Phalcon CLI http://docs.phalconphp.com/en/latest/reference/cli.html
But arguably you can call it however you want.

Ben commented on Mar 5th 2014