uxf / content
3.80.3
2026-06-10 11:04 UTC
Requires
- php: ^8.4
- ext-json: *
- uxf/storage: 3.80.3
This package is auto-updated.
Last update: 2026-06-10 09:09:09 UTC
README
Install
$ composer req uxf/content
ContentSearchHelper
function search(string $term) {
$qb = $this->entityManager->createQueryBuilder()
->select('article')
->from(Article::class, 'article');
$qb = ContentSearchHelper::apply($qb, 'article.content.textSearch', $text, ContentSearchHelper::EQUALS);
return $qb->getQuery()->getResult();
}
Doctrine migration
$this->addSql("CREATE TEXT SEARCH DICTIONARY unaccented_czech (template = ispell, dictfile = 'unaccented_czech', afffile = 'unaccented_czech', stopwords = 'unaccented_czech')");
$this->addSql("CREATE TEXT SEARCH CONFIGURATION unaccented_cs (copy = simple)");
$this->addSql("ALTER TEXT SEARCH CONFIGURATION unaccented_cs ALTER MAPPING FOR asciiword, asciihword, hword_asciipart, word, hword, hword_part WITH unaccented_czech");
GIN index
-- original
CREATE INDEX IDX_42803DB7DCC6AB0B ON app_blog.test_article (content_search);
-- modified
CREATE INDEX IDX_42803DB7DCC6AB0B ON app_blog.test_article USING GIN(content_search);