Architecture Capsules by Vid: A loveable and fast search experience for your Drupal site
Do you need business search applications and enterprise features for your digital business? Elasticsearch, in combination with Drupal 8, can be a perfect fit. This edition of Architecture Capsules brings you the valuable tips and tricks on implementing Elasticsearch with Drupal.
Business use case and benefits
Implement a user friendly and modern search experience in low turn around time and in budget.
Requirement criteria
1. Search should allow users an easy way to drill down content. (Read facets)
2. Search experience should be super fast. (Read Decoupled / elastic)
3. Should work seamlessly with Drupal content.
Stack used
Drupal 8, ElasticSearch, React, Elasticsearch connector module, Searchkit (It is a suite of React components that communicate directly with your Elasticsearch cluster).
Architecture notes
1. Configure the elasticsearch connector module on your Drupal 8 site to connect and index your content in elastic search. This link might be useful for further read on this.
2. Use npm to install searchkit.
3. Configure searchkit to make connection to elastic server. For more information, read here.
4. Make sure to check if you need to proxy the connection to elastic or not. In case you do, SearchKit has a plugin (Searchkit-express) which does that easily.
5. Generate the build of searchkit. Integrate the build with empty target container div in a drupal block or your theme.
5. More customisations and custom extentions for searchkit can be written. Follow the decently wide documentation it has.
Things to watch out for (Read Caution!)
The components in Searchkit require elasticsearch fields indexed in a particular way. For example, the Hierarchical Menu needs data to be indexed in levels. See Indexing & Mapping Guide or the component's pages for more information. You might need to add custom fields indexed in particular way from a custom Drupal module.
Subscribe
Related Blogs
Inside the Drupal AI Summit: Themes, Speaker and What To Expect
“ The web is changing fast, and AI is rewriting the rules. It writes content, builds pages, and answers questions directly,…
FOST and Drupal AI Initiative: Next Era of Responsible AI
Three years after the launch of generative AI tools marked a new age for artificial intelligence, almost 90% of survey…
Drupal AI Ecosystem Part 5: AI Content Suggestions
Drupal has steadily evolved from being just a content management system into a flexible platform that incorporates emerging…