Prerequisites
Active HawkSearch account
Magento running on the server which has the following
Configured CRON jobs
Message queue management is enabled. See Magento documentation for details
Installation
Install via Composer
Install composer packages
composer require hawksearch/esindexing-magento-2 --no-update composer update hawksearch/esindexing-magento-2
Setup the extension in Magento
bin/magento module:enable --clear-static-content HawkSearch_Connector HawkSearch_EsIndexing bin/magento setup:upgrade bin/magento cache:flush
Configuration
Hawksearch Account
Before Hawksearch can be used with Magento, a Hawksearch account is needed. Having the account, it’s possible to configure the Magento extension to work properly.
Contact your account manager at https://www.hawksearch.com/ and request for an account.
Magento Settings
To configure the Magento extension you need the following Hawksearch credentials:
Engine Name - this is the engine ID associated with your HawkSearch account.
API Key - it is used by the module to connect to HawkSearch Rest API.
Tracking Key - it is used to uniquely identify your account in the image pixel that is added to the order confirmation page on the site to track orders and generate appropriate reports in Hawk Search.
In the administration section of your Magento project, navigate to Stores > Configuration > HAWKSEARCH > Connection Settings
and fill in the form with all the information required.
Specify Run Mode setting depending on the site environment. Read more in Domains and Environments documentation section
Enable Indexing in Indexing Settings and make your first data push to HawkSearch.
Fields Configuration
Before you push Magento data to HawkSearch it requires some Fields to be created in Hawksearch Dashboard. There are several Default System Fields which are used to correctly identify documents in Hawksearch index as well as mandatory Products and Pages fields.
Indexing
After extension is configured and Fields are created data from Magento should be initially pushed to HawkSearch. The process is called indexing. To accomplish this run the following CLI command:
php bin/magento indexer:reindex hawksearch_products