versh23 / manticore-bundle
Manticore PHP integration for your Symfony project using Manticore and Doctrine ORM
Installs: 35
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 3
Forks: 2
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^7.1
- doctrine/doctrine-bundle: ^2.0
- doctrine/orm: ^2.7
- foolz/sphinxql-query-builder: ^2.1
- pagerfanta/pagerfanta: ^2.1
- psr/log: ^1.1
- symfony/config: ^4.4|^5.0
- symfony/console: ^4.4|^5.0
- symfony/dependency-injection: ^4.4|^5.0
- symfony/http-kernel: ^4.4|^5.0
- symfony/property-access: ^4.4|^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.16
- phpstan/phpstan: ^0.12.9
- symfony/phpunit-bridge: ^4.4|^5.0
- symfony/web-profiler-bundle: ^4.4|^5.0
- symfony/yaml: ^4.4|^5.0
This package is auto-updated.
Last update: 2025-03-06 00:35:26 UTC
README
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 samplemanticore:index:populate
- populate RT index