Search code examples
postgresqlsymfonydoctrinefull-text-searchgwt-gin

How to perform full text search on a gin postgres index in doctrine 2.2?


Is there a simple way of doing this in doctrine, or am I going to have to do a native sql query? If someone could point me in the right direction, it would be appreciated.


Solution

  • Quick answer is, no. There is not a "simple way" of doing this.

    You need to use Doctrine Native SQL which can be found here. This will allow you to map the results into usable entities like you're used to while using database specific things.

    You could also use a DQL user defined function, described here. This is probably the "correct" way.