Download the PHP package acseo/sylius-typesense without Composer
On this page you can find all versions of the php package acseo/sylius-typesense. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download acseo/sylius-typesense
More information about acseo/sylius-typesense
Files in acseo/sylius-typesense
Package sylius-typesense
Short Description Sylius Typesense is a plugin for integrating Typesense, a fast and powerful search engine, with Sylius, an open-source e-commerce platform. This plugin boosts your Sylius store’s search capabilities by leveraging Typesense’s advanced search features, providing fast, relevant search results.
License MIT
Informations about the package sylius-typesense
Sylius Typesense
Introduction
Sylius Typesense is a plugin for integrating Typesense, a fast and powerful search engine, with Sylius, an open-source e-commerce platform. This plugin boosts your Sylius store’s search capabilities by leveraging Typesense’s advanced search features, providing fast, relevant search results.
Features
- Seamless integration with Sylius.
- Automatic indexing of product data.
- Support for a variety of field types (e.g., primary, collection, object).
- Easy-to-use console commands for creating and importing collections.
Installation
Follow these steps to integrate Sylius Typesense into your project:
Step 1: Install the Package
Install the Sylius Typesense plugin using Composer. Run the following command in your terminal:
Step 2: Register the Plugin
Once the package is installed, you need to register the plugin in your Symfony application. Open the config/bundles.php file and add the following lines:
Step 3: Import Required Configuration
Next, import the configuration by adding the service definitions to your config/packages/_sylius.yaml file:
Step 4: Import Routing Configuration
To make the routes available, you need to import the routing configuration. Add the following lines to your config/routes.yaml file:
Step 5: Set Up Typesense with Docker
To run Typesense locally, you can use Docker. Add the following service definition to your docker-compose.yaml file: Add to docker-compose.yaml
Start the services by running:
Configuration
Step 1: Configure Environment Variables
Add the following configuration to your .env file to set up the Typesense URL and API key:
Step 2: Plugin Configuration
Next, add the following configuration to your config/packages/acseo_typesense.yaml file:
You can use various field types supported by Typesense such as string, int32, float, and others. Types such as primary, collection, and object are also supported.
Step 3: Modify the ProductTranslation Entity
To ensure compatibility with the Typesense plugin, you need to extend the ProductTranslation entity from ACSEO\SyliusTypesense\Entity\Product\ProductTranslation. Modify the ProductTranslation class in your App\Entity\Product namespace like so:
This will allow Sylius Typesense to properly work with your custom product translations.
Step 4: Add Plugin Templates
Copy the plugin templates into your project's template directory. Run the following command:
Usage
Create Index and Populate Data
This plugin provides useful commands to create and index your data.
Create collection structure
To create the collection structure, run the following command:
Import collections with Doctrine entities
To import collections with your Doctrine entities, use the following command:
All versions of sylius-typesense with dependencies
sylius/sylius Version >=1.12 <1.14
acseo/typesense-bundle Version ^0.8.0
pagerfanta/pagerfanta Version ^3.8