A search engine is a crucial part of e-commerce. It can drive more sales if the search results are good and it can worsen the user experience if they are bad.
Changing the search provider usually involved changing code both in the front-end and in the back-end, creating unnecessary friction.
The idea behind the VTEX search protocol is to provide a clear contract between any VTEX store on VTEX IO and a search provider defined by a GraphQL schema. This contract enables low-effort switching between different search engines. And it also helps to speed up the development process of integration with a new search provider, because the integration will be completely decoupled from the front-end components.
Search protocol benefits both developers and VTEX stores!
The VTEX Search Protocol is a set of definitions and GraphQL schemas that allows VTEX IO applications to serve e-commerce search results that can be used by VTEX Store Framework.
Creating a search-resolver service app on VTEX IO, which implements VTEX Search Protocol, allows any VTEX Account using VTEX IO to install such an application and, instantly, change the store's provider for search results. This is really useful as no frontend modification is required. It's also possible to distribute the search provider on VTEX App Store to make the installation process even simpler.
The GraphQL schema for VTEX Search Protocol defines the set of queries necessary for Store Framework to retrieve search information. This also includes the appropriate GraphQL types that any search resolver app should respond to.
You can check this schema on the vtex.search-graphql app here. The schema definition is on
graphql/schema.graphql but there's also a reference on the repository's
- Access to a user in a VTEX account, with permissions to link and install apps
- TypeScript and Node.js familiarity
- GraphQL familiarity
Updated almost 2 years ago