MatchAgainstBundle
Very first release
Berdasarkan https://gist.github.com/zebigduck/1234419
composer require ciricihq/match-against-bundle Anda harus memuat bundel yang disediakan config.yml untuk memiliki kalimat mysql MATCH_AGAINST
imports :
- { resource: ../../src/Cirici/MatchAgainstBundle/Resources/config/config.yml }Buat kueri:
$ 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 )
; Lisensi di bawah lisensi GNU GPL 2.0. Lihat file LICENSE untuk lebih jelasnya.
Hak Cipta 2015 © Cirici Media Baru