MatchAgainstBundle
Very first release
Basierend auf https://gist.github.com/zebigdi./1234419
composer require ciricihq/match-against-bundle Sie müssen das vom Bundle bereitgestellte config.yml laden, um den Satz MATCH_AGAINST MySQL zu haben
imports :
- { resource: ../../src/Cirici/MatchAgainstBundle/Resources/config/config.yml }Eine Frage machen:
$ qbuilder
-> select ( ' sti.foreignId ' )
-> from ( ' CiriciMatchAgainstBundleEntitySearchTextIndex ' , ' sti ' )
-> where ( ' sti.model = :entityClass ' )
-> andWhere ( ' sti.field = :fieldName ' )
// ->andWhere("MATCH_AGAINST(sti.content, :text 'IN NATURAL LANGUAGE MODE') > :score")
-> andWhere ( " MATCH_AGAINST(sti.content, :text 'IN BOOLEAN MODE') > :score " )
-> setParameter ( ' entityClass ' , $ entity_class )
-> setParameter ( ' fieldName ' , $ field_name )
-> setParameter ( ' text ' , $ text )
-> setParameter ( ' score ' , $ score )
; Lizenziert unter der GNU GPL 2.0 -Lizenz. Weitere Informationen finden Sie in der LICENSE .
Copyright 2015 © Cirici Neue Medien