DoctrineFullTextPostrgresBundle
Symfony2 Bundle for the DoctrineFullTextPostgres package, (*1)
Install
Add the DoctrineFullTextPostgresBundle to your composer.json:, (*2)
{
"require": {
"vertigolabs/doctrine-full-text-postgres-bundle": "v1.0"
}
}
Or require it directly with composer:, (*3)
$ php composer.phar require vertigolabs/doctrine-full-text-postgres-bundle:v1.0
The bundle will be installed in your projects vendor directory in vertigolabs/doctrine-full-text-postgres-bundle/
, (*4)
Enable
Add the bundle to your kernel:, (*5)
<?php
// app/AppKernel.php
public function registerBundles()
{
$bundles = array(
//...
new VertigoLabs\DoctrineFullTextPostgresBundle(),
);
}
# Doctrine Configuration
doctrine:
dbal:
types:
tsvector: VertigoLabs\DoctrineFullTextPostgres\DBAL\Types\TsVector
mapping_types:
tsvector: tsvector
orm:
entity_managers:
default:
dql:
string_functions:
tsquery: VertigoLabs\DoctrineFullTextPostgres\ORM\Query\AST\Functions\TsQueryFunction
tsrank: VertigoLabs\DoctrineFullTextPostgres\ORM\Query\AST\Functions\TsRankFunction
tsrankcd: VertigoLabs\DoctrineFullTextPostgres\ORM\Query\AST\Functions\TsRankCDFunction
services:
vertigolabs.doctrinefulltextpostgres.listener:
class: VertigoLabs\DoctrineFullTextPostgres\Common\TsVectorSubscriber
tags:
- { name: doctrine.event_subscriber, connection: default }
Usage
refer to the read me for the DoctrineFullTextPostgres package for usage instructions, (*6)