Getting started - Indexes - Special indexes.php 639 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
<?php ?>
Doctrine supports many special indexes. These include Mysql FULLTEXT and Pgsql GiST indexes.
In the following example we define a Mysql FULLTEXT index for the field 'content'.
<br \><br \>
<?php 
renderCode("<?php
class Article 
{
    public function setTableDefinition() 
    {
    	\$this->hasColumn('name', 'string');
        \$this->hasColumn('content', 'string');
    }
    public function setUp() 
    {
        \$this->option('index', 
                        array('content' =>
                            array('content' => 
                                array('fulltext' => true));
    }
}
?>");