Add a FULLTEXT index in Doctrine 2 using annotations?

前端 未结 2 1522
猫巷女王i
猫巷女王i 2021-02-01 18:08

I know that Doctrine 2 doesn\'t support FULLTEXT indexes. I\'m actually using a result set mapping and native queries to FULLTEXT search innodb tables (MySQL 5.6). But I still n

2条回答
  •  遇见更好的自我
    2021-02-01 18:50

    Here is an example how to make a fulltext index with the yaml mapping driver.

    Doctrine\Tests\ORM\Mapping\Comment:
        type: entity
        fields:
            content:
                type: text
        indexes:
            xy_fulltext:
                columns: ["name", "content", "keywords"]
                flags: fulltext
    

提交回复
热议问题