定制 ciricihq/match-against-bundle 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ciricihq/match-against-bundle

最新稳定版本:v1.0.0

Composer 安装命令:

composer require ciricihq/match-against-bundle

包简介

A search bundle for symfony, using MySQL FULLTEXT MATCH AGAINST

README 文档

README

Based on https://gist.github.com/ZeBigDuck/1234419

Installing

composer require ciricihq/match-against-bundle

Usage

You must load the bundle provided config.yml in order to have the MATCH_AGAINST MySQL sentence

imports:
    - { resource: ../../src/Cirici/MatchAgainstBundle/Resources/config/config.yml }

Make a query:

  $qbuilder
      ->select('sti.foreignId')
      ->from('Cirici\MatchAgainstBundle\Entity\SearchTextIndex', '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)
  ;

License

Licensed under the GNU GPL 2.0 license. Check out the LICENSE file for more details.

Copyright 2015 © Cirici New Media

统计信息

  • 总下载量: 3.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 2
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 5
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL-2.0
  • 更新时间: 2016-03-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固