valantic/pimcore-elastica-bridge
not-reviewed
No Category
Detailsvalantic/pimcore-elastica-bridge
No Category
Project Summary
Elastica bridge for Pimcore
Readme
Elastica Bridge for Pimcore
NO support is provided!
This package is developed by valantic CEC Schweiz and is under active development.
Setup
composer require valantic/pimcore-elastica-bridge
- Enable the bundle using one of the following methods
- Use the Pimcore UI
- Open the Tools -> Bundles screen in Pimcore
- Enable the bundle
- Use the Pimcore CLI
bin/console pimcore:bundle:enable ValanticElasticaBridgeBundle
- Edit files
- Edit
var/config/extensions.php
- Add
"Valantic\\ElasticaBridgeBundle\\ValanticElasticaBridgeBundle" => TRUE,
- Edit
- Use the Pimcore UI
- Configure the connection to your Elasticsearch cluster as seen in
example/app/config/config.yml
- Don't forget to register your newly created services (implementing
IndexInterface
etc.) in yourservices.yml
AppBundle\Elasticsearch\: resource: '../../Elasticsearch'
Usage
Please see the docs/example/
folder for a complete example.
Simplified, these are the steps to get the bundle up and running:
- Configure the Elasticsearch client in
app/config/config.yml
- Define the mapping between an Elasticsearch document and a Pimcore element by implementing
\Valantic\ElasticaBridgeBundle\DocumentType\DocumentInterface
- Define the Elasticsearch index by implementing
\Valantic\ElasticaBridgeBundle\Index\IndexInterface
- Define how a document is persisted in an index by implementing
\Valantic\ElasticaBridgeBundle\DocumentType\Index\IndexDocumentInterface
Indexing
Bulk
$ console valantic:elastica-bridge:index --help
Description:
Ensures all the indices are present and populated.
Usage:
valantic:elastica-bridge:index [options] [--] [<index>...]
Arguments:
index Optional: indices to process. Defaults to all if empty
Options:
-d, --delete Delete i.e. re-create existing indices
-p, --populate Populate indices
-c, --check Perform post-populate checks
-h, --help Display this help message
Specific
The bridge automatically listens to Pimcore events and updates documents as needed.
This can be globally disabled by calling \Valantic\ElasticaBridgeBundle\EventListener\Pimcore\AbstractListener::disableListener();
or by implementing \Valantic\ElasticaBridgeBundle\Index\IndexInterface::subscribedDocuments
.
Status
$ console valantic:elastica-bridge:status --help
Description:
Displays the status of the configured Elasticsearch indices