lupasearch / magento2-lupasearch-plugin
LupaSearch module
Installs: 281
Dependents: 2
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 1
Open Issues: 1
Type:magento2-module
Requires
- php: >=7.4
- lupasearch/magento2-lupasearch-plugin-core: ^1.0.0
- magento/framework: *
- magento/magento2-base: *
- magento/module-advanced-search: *
- magento/module-catalog: *
- magento/module-config: *
- magento/module-cron: *
- magento/module-eav: *
- magento/module-elasticsearch: *
- magento/module-grouped-product: *
- magento/module-inventory: *
- magento/module-inventory-sales-api: *
- magento/module-search: *
- magento/module-store: *
- magento/module-ui: *
- magento/module-weee: *
- monolog/monolog: *
- psr/log: *
- symfony/console: *
Requires (Dev)
- phpunit/phpunit: ^9
- squizlabs/php_codesniffer: ~3.7.2
This package is auto-updated.
Last update: 2025-04-04 09:21:37 UTC
README
Introduction
The LupaSearch Magento 2 Plugin integrates LupaSearch's search functionality into your Magento 2 store, providing enhanced search capabilities that improve the user experience.
Requirements
- PHP: >=7.4
- Magento 2: compatible with Magento 2.2.x - 2.4.x
- Optional: For MySQL-based queues, install the lupasearch/magento2-lupasearch-plugin-queue-db extension.
Installation
1. Install with Composer
Install the core LupaSearch plugin:
composer require lupasearch/magento2-lupasearch-plugin
If RabbitMQ is not available, include the MySQL queue compatibility extension:
composer require lupasearch/magento2-lupasearch-plugin-queue-db
2. Enable modules
php bin/magento module:enable LupaSearch_LupaSearchPluginCore LupaSearch_LupaSearchPlugin
If the MySQL queue compatibility extension is installed, enable it as well:
php bin/magento module:enable LupaSearch_LupaSearchPluginQueueDb
3. Run installation scripts
php bin/magento setup:upgrade
php bin/magento setup:di:compile
Change Indexer Mode to "On Schedule" (only works on this mode)
bin/magento indexer:set-mode schedule lupasearch_product lupasearch_category
Enable cache
bin/magento cache:enable lupasearch
💡 Before indexing, make sure your index mappings are already configured. If your product, category, or suggestion mappings do not exist yet, use the examples available here: https://github.com/lupasearch/magento2-plugin/tree/main/examples/mapping
To update a mapping, use the mapping endpoints available in the LupaSearch API: https://console.lupasearch.com/docs/api#tag/Mapping
4. Configure the extension
4.1. Initial configurations
Navigate to Stores -> Configuration -> Catalog -> LupaSearch in your Magento admin panel.
Configure the following settings:
- General configuration > API Key: Generate an API Key in the LupaSearch Dashboard and paste it into this field.
- Indices > Product: Copy the UUID of your product search index from the LupaSearch Dashboard and paste it here.
- Indices > Product Suggestion: Copy the UUID of your product suggestion index and paste it here.
- Indices > Category: Copy the UUID of your category search index and paste it here.
- Indexing > Enabled: Set this option to Yes.
Click Save Config to apply your changes.
4.2. Generate search configurations
After saving the initial settings, go to the LupaSearch Queries Management section in your Magento admin panel. Click the Generate All Queries button. A confirmation message, "Queries successfully generated," will appear once the process is complete. To verify, go to the Search Queries page in the LupaSearch Dashboard and confirm that all queries are created successfully.
5. Indexing
Reindex the data:
bin/magento index:reindex lupasearch_product
bin/magento index:reindex lupasearch_category
Manually run the indexer to refresh the data:
bin/magento indexer:reindex lupasearch_product bin/magento indexer:reindex lupasearch_category
6. Run consumers
Start the LupaSearch queue consumers to process queued tasks:
bin/magento queue:consumers:start lupasearch.all
7: Verify data
- Log in to the LupaSearch Console.
- Navigate to your product index.
- Verify that your products and categories are correctly indexed and available.
Adding Custom Product Attributes
To add custom attributes to the product feed, follow these steps:
-
Review existing Hydrators used in the plugin: https://github.com/lupasearch/magento2-plugin/tree/main/Model/Product/Hydrator
-
Create your own Hydrator class implementing the logic for your custom attribute.
-
Register the new Hydrator in di.xml by adding it to the hydrator pool, for example: https://github.com/lupasearch/magento2-plugin/blob/main/etc/di.xml#L476
-
Go to your index mapping and add the new attribute field.
-
Add the new attribute to your search query configuration.
Support
For questions or assistance, contact us at support@lupasearch.com.