定制 versh23/manticore-bundle 二次开发

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

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

versh23/manticore-bundle

Composer 安装命令:

composer require versh23/manticore-bundle

包简介

Manticore PHP integration for your Symfony project using Manticore and Doctrine ORM

README 文档

README

Build Status

Installation

This bundle should to be installed with Composer The process vary slightly depending on if your application uses Symfony Flex or not.

Following instructions assume you to have Composer installed globally, as explained in the installation chapter of the Composer documentation.

Applications that use Symfony Flex

Open a command console, enter your project directory and execute:

composer require versh23/manticore-bundle

Applications that don't use Symfony Flex

Step 1: Download the Bundle

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

composer require versh23/manticore-bundle

Step 2: Enable the Bundle

Then, enable the bundle by adding it to the list of registered bundles in the app/AppKernel.php file of your project:

<?php
// app/AppKernel.php

// ...
class AppKernel extends Kernel
{
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new Versh23\ManticoreBundle\Versh23ManticoreBundle(),
        );

        // ...
    }

    // ...
}

Configuration

Create configuration file config/packages/manticore.yaml

Example

versh23_manticore:
    host: 'manticore'
    port: 9306
    indexes:
        my_entity:
            class: App\Entity\MyEntity
            fields:
                description: ~ #short syntax
                name:          #full syntax
                    property: name

            attributes:
                free: bool #short syntax
                status:    #full syntax
                    property: status
                    type: string

In this example will be created a manticore.index_manager.article service that allow to manipulate index manticore.index.article

  • truncate index (truncateIndex())
  • flush index (flushIndex())
  • replace/insert/delete operations (replace(), insert(), delete(), bulkReplace(), bulkInsert() )
  • create a Pagerfanta object (findPaginated()) https://github.com/whiteoctober/Pagerfanta
  • simple find objects (find())
  • create custom query by SphinxQL syntax (createQuery)

For App\Entity\MyEntity will be created Event listener manticore.listener.article thats allow update your RT index my_entity

There are two useful commands:

  • manticore:index:config - render config sample
  • manticore:index:populate - populate RT index

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 2
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2020-02-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固