Doofinder
Danger
Be very careful using Magento 2 and Doofinder, you can easily clobber the live search results.
Installing the module¶
Standard installation via composer (if it is not already installed)
Check the manual
Setting up on staging¶
- You'll need to whitelist the doofinder ip in the public container nginx config and turn cert to optional
location / { allow 54.171.4.216; .... }
server {
...
ssl_verify_client optional;
...
location / {
...
}
}
- Also make sure the allowed domain in doofinder itself is the exact domain and not a wildcard
Example:
www.magento2.client.developmagento.co.uk
instead of*.developmagento.co.uk
which will be set by default - Add the api key which needs to to also be a management key in doofinder config in magento admin
- Add the has ids to each of the store views
- Add the doofinder script layer on each store view as well and make sure it is turned on
- Process the Data source in doofinder itself
- Change the catalog search from MySql to Doofinder in magento admin
Preventing local clobbering live¶
Doofinder in magento 2 works by sending the data to doofinder rather than the other way round like magento 1.
1. Don't use wildcards in the doofinder security tab such as *.developmagento.co.uk
, this does not block the search coming through from desktop.
2. Switch from doofinder to MySQL search
Stores -> Configuration -> Catalog -> Catalog -> Catalog Search -> Search Engine -> MySQL
UPDATE core_config_data SET value='mysql' WHERE path = 'catalog/search/engine';
Stores -> Configuration -> Doofinder -> Configuration -> Enabled -> No
UPDATE core_config_data SET value='' WHERE path LIKE '%doofinder%';
Enabled
to No