A first party module to integrate Elastic App Search in Magento 2.

Overview

Elastic App Search Logo

GitHub release CircleCI build

A first-party Magento integration for building excellent, relevant search experiences with Elastic App Search.

⚠️ This is a beta version of the client. View known issues.

Contents


Getting started 🐣

Using this client assumes that you have already:

  • Created an App Search account on https://swiftype.com/ or you have a self managed version of App Search available
  • PHP >= 7.1
  • Magento >= 2.2.6 installed and running

You can install the module in your project by using this composer command from your Magento project root:

composer require elastic/app-search-magento:1.0.0-beta3@beta

Once the module is installed, you should clean your cache and update your Magento instance if already installed:

bin/magento cache:clean
bin/magento setup:upgrade

Usage

Configuring App Search credentials

To configure your credentials, you will need to collect the following information:

  • Your App Search API endpoint
  • Your App Search Private API key
  • Your App Search Public Search key

If using a swiftype.com account, you will be able to access this information at https://app.swiftype.com/as/credentials.

Self-managed users should connect to their App Search instance to retrieve their credentials.

From Magento Admin

You can provide your App Search credentials within Magento Admin by browsing to the Stores > Configuration > General > Elastic App Search section:

App Search Credentials Config

Note: The module will create one App Search Engine per store view. New Engines will use a prefix that can be configured within the client: e.g. magento2-catalogfulltext-search-1.

Update this setting (e.g. my-website-staging) if you plan to use the same account for several environment.

From Magento CLI

You can update credentials using the Magento CLI:

bin/magento config:set elastic_appsearch/client/api_endpoint "https://host-xxxx.api.swiftype.com"
bin/magento config:set elastic_appsearch/client/private_api_key "private-XXXXX"
bin/magento config:set elastic_appsearch/client/search_api_key "search-XXXXX"

You can additionally set the Engine prefix:

bin/magento config:set elastic_appsearch/client/engine_prefix "my-website-staging"

Configuring App Search as Magento default search engine

Once your credentials are set in Magento, you need to update Magento configuration to use App Search instead of the out of the box MySQL search engine.

Browse to the Stores > Configuration > Catalog > Catalog Search section to do so:

Engine configuration

As an alternative, you can use the Magento CLI to change the default search engine:

bin/magento config:set catalog/search/engine "elastic_appsearch"

Reindexing content

To finish the install, you need to clean your cache and reindex your content into App Search:

bin/magento cache:clean
bin/magento indexer:reindex catalogsearch_fulltext

Known issues

The module is in its first round of beta. This first round is intended to act as a technical preview, which aims to integrate App Search as a Magento search adapter interface.

There are a few caveats with the current implementation:

  • The maximum number of fields allowed by App Search (currently 64) does not allow you to index catalogs with too many products attributes (#37)

  • We will need to rework how product prices are stored into App Search to allow sites with a large number of customer groups to be indexed (#38)

  • Search relevance is still being tuned.

Development

We ❤️ developers and want everyone to be able to contribute to the module.

We have built a fully dockerized development environment using Magento sample data to help you in testing the module and contributing to the code.

Full documentation to setup your environment is available here.

FAQ 🔮

Where do I report issues with the client?

If something is not working as expected, please open an issue.

Where can I find the full App Search API documentation ?

Your best bet is to read the documentation.

Where else can I go to get help?

You can checkout the Elastic community discuss forums.

Contribute 🚀

We welcome contributors to the project. Before you begin, a couple notes...

License 📗

Open Software License ("OSL") v.3.0 © Elastic

Thank you to all the contributors!

Comments
  • Unable To Find sku_value

    Unable To Find sku_value

    Received the following errors this morning on my staging 2.3.2 environment and my development 2.3.3 environment: Exception #0 (Magento\Framework\Exception\LocalizedException): Unable to find field sku_value.

    Staging: This event happened when trying to search or navigate into the Magento catalog. https://c9.saderra.com/catalog/category/view/s/boat-covers/id/12/

    Development: Same condition to reproduce: https://classic.saderra.com/patio/shop-by-collection/storigami

    support 
    opened by saderra 13
  • Rate Limit

    Rate Limit

    We are seeing the following error generated by this plugin: "query_params":[]},"error":"Rate limit exceeded"} []

    How do we manage this?

    bug enhancement 
    opened by saderra 5
  • Another Issue

    Another Issue

    Another issue has arisen when your module is installed on 2.3.2, without the other aforementioned extension:

    Compare this site on our live production site: https://classicaccessories.com/patio-furniture-cushions/lounge-chair-cushions

    This site is a direct backup of that site, with the finder module disabled and your extension enabled: https://c1.saderra.com/patio-furniture-cushions/lounge-chair-cushions

    The error is: [2019-10-16 01:57:55] main.INFO: Reference to undeclared plugin with name 'stockedProductsFilterPlugin'. This seems to be discussed here:

    https://github.com/magento/inventory/blob/d956bd063d2d35f75c58c0e48cdfa31db28b4efd/app/code/Magento/InventoryElasticsearch/etc/di.xml#L10

    support 
    opened by saderra 3
  • PHP7.0 compatibility

    PHP7.0 compatibility

    Hello guys,

    i know your work is good, but in the real world we need to work with a multiple installation types.

    Please Add php7.0 support.

    Thank you so much

    opened by samuel20miglia 3
  • Error in rescorer when the request size is 0

    Error in rescorer when the request size is 0

    Vanilla install. 2.3.3 on EC2/Nginx.

    Condition: Attempt to navigate to any category page: https://classicstaging.net/patio https://classicstaging.net/bbq-grill etc...

    The following error loads:

    1 exception(s): Exception #0 (Exception): Warning: array_chunk(): Size parameter expected to be greater than 0 in /var/www/html/vendor/elastic/app-search-magento/src/module-catalog-search/Model/Product/SearchAdapter/RequestExecutor/Rescorer/CategoryPositionRescorer.php on line 112

    Additional error information viewable on the above link.

    bug 
    opened by saderra 2
  • Small clarity update to dev-env setup

    Small clarity update to dev-env setup

    @afoucret - some small updates to the dev env setup doc - mostly for clarity, and moved the "configure env variable" section before the build to avoid confusion.

    opened by aznick 2
  • Indexing schema implementation

    Indexing schema implementation

    This PR contains everythings indexer will need to manipulate and update schemas:

    • [X] Create schema model
    • [X] SchemaResolverInteface allows to locate the schema of a particular engine (e.g. getSchema('catalogsearch_fulltext'))
    • [X] Dummy SchemaProvider for product
    • [x] Add updateSchema operation in EngineManagerInterface
    • [x] Use it all in IndexStructure

    The product schema contains only one field (test with the type text).

    You can test the schema is correctly updated by running the fulltext indexing command:

    bin/magento indexer:reindex catalogsearch_fulltext
    

    Note: Clean all caches before doing it bin/magento cache:clean

    A coming PR will implement the actual product schema instead of this dummy one.

    opened by afoucret 2
  • Undefined Factory

    Undefined Factory

    Installation on a fresh magento 2.3.3 install, LAMP, multi-store configuration results in the following when attempting to search:

    1 exception(s): Exception #0 (DomainException): Undefined factory elastic_appsearch

    bug 
    opened by saderra 1
  • Fix Tags XML

    Fix Tags XML

    I opened the PR https://github.com/elastic/app-search-magento/pull/52

    adding xml tag closing in app-search-magento / src / framework-app-search / etc / app_search_fields.xsd file

    bug 
    opened by carlosfreitasjunior 1
  • Better sync management process.

    Better sync management process.

    Improve the sync manager to:

    • tag search requests used to wait for indexed documents to be searchable
    • tag search requests used by document purge
    • add a max number of attempts when waiting for the documents to be searchable
    opened by afoucret 0
  • Fix a breaking change introduced in Magento 2.3.2.

    Fix a breaking change introduced in Magento 2.3.2.

    A breaking change has been introduced in Magento 2.3.2.

    This BC makes mandatory to declare new factories for the search module (magento/magento2#23615).

    This patch solves a regression caused by this change if using the module with Magento >= 2.3.2.

    bug 
    opened by afoucret 0
  • Autocomplete popup

    Autocomplete popup

    Hi,

    Is there a way to use this module using a js popup to show results in the frontend? I mean, without using the backend. Launching queries directly to the external service in "autocomplete mode" from javascript.

    Thank you.

    opened by SergioViteri 0
  • Pagination issues

    Pagination issues

    Customer is reporting that when they switch from MySQL to the App Search Magento plugin, the pagination on their site fails to load correctly. For instance, a search that brings 300 results will show 3 results on the first page, 5 on the second page, 4 on the third page, etc although 24 results per page is selected. Pagination settings in Magento are default. API activity in App Search looks normal. When the customer switches back to using the MySQL database, pagination goes back to normal.

    opened by sarahsbohr 0
  • Query can contains only one match query with name search

    Query can contains only one match query with name search

    While we try to search it produce error https://prnt.sc/ulkfxy

    1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Query can contains only one match query with name search

    Exception #0 (Magento\Framework\Exception\LocalizedException): Query can contains only one match query with name search

    #1 Elastic\AppSearch\Framework\AppSearch\SearchAdapter\RequestExecutor\Filter\QueryFilterBuilder->getFilter()
    
    
    
    		                                  
    		                                    
    	                                    
    opened by pgsutariya 2
  • Could not check engine exists: Unauthorized action.

    Could not check engine exists: Unauthorized action.

    I install the module app-search-magento in my magento 2.4 version. While i'm trying to save Search Engine it will show error like Could not check engine exists: Unauthorized action.

    Swift Credentials: https://cloud.elastic.co/ Host Identifier: host-1c8k8y API Endpoint: https://host-1c8k8y.api.swiftype.com Public Search Key: search-jcjrvztgzm8w7xh8k8ce63v6 Private API Key: private-g76w12caf1y3s4c17e9kgg6m username: elastic password: IWNJ12JdcpmsR22fiK3bbEnW

    opened by pgsutariya 1
Releases(1.0.0-beta4)
  • 1.0.0-beta4(Oct 31, 2019)

    We are pleased to announce that the fourth beta of the Elastic App Search Magento module is now available. This release focuses mostly on technical improvements.

    Changelog 📖

    Bugfixes

    • Fix an error that occurs when running a search if page size 0 (#68)
    • Sync manager improvements (#69)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-beta3(Oct 14, 2019)

    We are pleased to announce that the third beta of the Elastic App Search Magento module is now available. This release focuses mostly on technical improvements.

    Changelog 📖

    Bugfixes

    • Fix a breaking change introduced in Magento 2.3.2 (#64)
    • Fix broken PHP CS (#62)
    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-beta2(Aug 9, 2019)

    We are pleased to announce that the second beta of the Elastic App Search Magento module is now available. This release focuses mostly on technical improvements.

    Changelog 📖

    Bugfixes

    • Ensure compatibility with Magento 2.2.x (>= 2.2.6 is still required) (#59)
    • Fix an error occurring when trying to configure an App Search self-managed server (#48)
    • Fix XML tags in the app_search_fields.xsd file (#53)
    • Fix an error in the install doc (#49)

    Improvements

    • Update to the latest App Search client (#57)
    • Code cleaning (#51)
    • Code quality test to enforce new php-md 2.7 rules (#56)
    • Devbox is now running a self-managed App Search service (#50)

    Documentation

    • Improve install doc (#60)
    • Make it clear that we support only PHP >= 7.1 (#55)

    Join the beta 👷

    We are very grateful for the feedback from the community and for the first community contributions (thanks to @carlosfreitasjunior and @samuel20miglia).

    Source code(tar.gz)
    Source code(zip)
  • 1.0.0-beta1(Jun 25, 2019)

    We are pleased to announce that the very first beta of the Elastic App Search Magento module is now available.

    With the release of this module, you can use Elastic App Search as the base Magento search engine. With it, you can ship leading search experiences more quickly and easily than ever before.

    Join the beta 👷

    The module is in its first round of beta. This first round is a technical preview which aims to validate our ability to integrate App Search as a Magento search adapter.

    We’re excited to receive community feedback. The Magento community is vibrant and skilled, and we hope to work with all of you to deliver the best possible search experience using Magento Elastic App Search. If you’d like to contribute to the project, we welcome GitHub issues and pull requests.

    Read more 📖

    Source code(tar.gz)
    Source code(zip)
Helper script to aid upgrading magento 2 websites by detecting overrides. Now supports third party module detections

ampersand-magento2-upgrade-patch-helper Helper scripts to aid upgrading magento 2 websites, or when upgrading a magento module This tool looks for fil

Ampersand 242 Dec 18, 2022
This demo app shows you how to run a simple PHP application on AWS Elastic Beanstalk.

Elastic Beanstalk + PHP Demo App - "Share Your Thoughts" This demo app shows you how to run a simple PHP application on AWS Elastic Beanstalk. Run the

AWS Samples 143 Nov 26, 2022
Elastic APM PHP Agent

Elastic APM Agent for PHP This is the official PHP agent for Elastic APM. The PHP agent enables you to trace the execution of operations in your appli

elastic 217 Dec 13, 2022
Magento 2 Extension to cleanup admin menu and Store > Configuration area by arranging third party extension items.

Clean Admin Menu - Magento 2 Extension It will merge all 3rd party extension's menu items in backend's primary menu to a common menu item named "Exten

RedChamps 109 Jan 3, 2023
A Magento 2 module to integrate Relay.

Magento Relay Installation First, install Relay as a PHP extension for your CLI and FPM environments. Next, install the Magento module: composer requi

CacheWerk 3 Jul 11, 2022
Magento 2 Module for Search Engine Optimization

Magento 2 Search Engine Optimization Magento 2 Module to Improve Search Engine Optimization (SEO) on your Magento site. Installation Install the modul

Stämpfli AG 100 Oct 7, 2022
Search faster into Magento DevDocs and Magento StackExchange! 🔍⚡️

VS Code - Magento DevSearch Search faster into Magento DevDocs and Magento StackExchange! ?? ⚡️ Magento DevSearch is a VS Code extension that allows y

Rafael Corrêa Gomes 12 Oct 18, 2022
Magento 2 Module Experius Page Not Found 404. This module saves all 404 url to a database table

Magento 2 Module Experius Page Not Found 404 This module saves all 404 urls to a database table. Adds an admin grid with 404s It includes a count so y

Experius 28 Dec 9, 2022
search non profitable charity or organization through api search

Non Profile Charity Search Search non profitable organization or get the details of an organization Installation Require the package using composer: c

Touhidur Rahman 5 Jan 20, 2022
Nova Search is an open source search engine developed by the Artado Project.

Loli Search Loli Search açık kaynak kodlu bir arama motorudur ve yalnızca kendi sonuçlarını değil, diğer arama motorlarının sonuçlarını da göstermekte

Artado Project 10 Jul 22, 2022
Doogle is a search engine and web crawler which can search indexed websites and images

Doogle Doogle is a search engine and web crawler which can search indexed websites and images, and then use keywords to be searched later. Written pri

Zepher Ashe 9 Jan 1, 2023
VoteSwiper helps citizens to find a political party that matches their own views in a playful way.

VoteSwiper / WahlSwiper - Website VoteSwiper (in Germany better known as WahlSwiper) is a cross-platform voting advice app for Android, iOS and web br

MOVACT 9 Aug 15, 2022
Revived of weareblahs/unifi-tv. Watch free channels by unifi TV on any 3rd party IPTV players that support MPEG-DASH + Widevine!

unifi-tv-revived Revived of weareblahs/unifi-tv. Watch free channels by unifi TV on any 3rd party IPTV players that support MPEG-DASH + Widevine! What

Sam Sam 6 Jun 14, 2022
Pat eu cookies law - 🌝 EU Cookie Law Compliance: A Textpattern plugin (or standalone script) for Third-Party Cookies (RGPD compliance)

pat_eu_cookies_law EU Cookie Law Compliance: A Textpattern plugin (or a standalone script) for Third-Party Cookies. A simple solution that respects th

Patrick LEFEVRE 3 Aug 16, 2020
An all-in-one package with the minimum third-party requirements to get started as quickly as possible with Pokemod Atlas

Pokemod Atlas All-In-One An all-in-one package with the minimum third-party requirements to get started as quickly as possible with Pokemod Atlas. ❤️

Pokemod 12 Oct 10, 2022
The Laravel eCommerce ABA Payment Gateway module allows the admin to integrate the ABA payment gateway to the online store.

Introduction Bagisto ABA Payment Gateway. Requirements: Bagisto: v1.3.2. Installation with composer: Run the following command composer require bagist

Bagisto 3 May 31, 2022
Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Automatically load the next page of products in Magento. Easy to install and configure, this module works 100% out of the box with vanilla Magento 1.9.x and earlier.

Strategery 123 Nov 20, 2021
Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines.

ReCaptcha Integrate reCAPTCHA using async HTTP/2, making your app fast with a few lines. use Illuminate\Support\Facades\Route; Route::post('login', f

Laragear 14 Dec 6, 2022