2007-01-25 15:34:03 +03:00
|
|
|
<?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');
|
2007-03-21 01:53:23 +03:00
|
|
|
|
2007-02-11 14:13:37 +03:00
|
|
|
\$this->index('content', array('fields' => 'content',
|
|
|
|
'type' => 'fulltext'));
|
2007-01-25 15:34:03 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
?>");
|