Categories

(83)
(69)
(8)
(34)
(74)
(149)

Search in Drupal 8: great opportunities and useful modules

05.07.2018
Search in Drupal 8: great opportunities and useful modules
Author:

Convenient searching is a keystone of good website navigation and usability. Help your website users always find what they want, and they will lose all the addresses of your competitors, completely forgetting their names. It’s great that Drupal 8 has excellent search opportunities that are fulfilled by a host of helpful modules. You don’t have to go far to seek them — we are going to give a little overview of them right now.

Drupal 8’s awesome search opportunities and modules

Core search in Drupal 8

Drupal’s core search has greatly improved in the 8th version. With nothing extra to install, the core Search module in Drupal 8 now lets you create custom search pages. These pages allow for searching for full words in any content nodes, as well as for users.

You can also decide on indexing settings and define the factors that influence the rankings (for example, the time of content creation, number of comments, keyword relevance, and more).

The core search in Drupal 8 works pretty well and is a nice choice for smaller websites that do not have much traffic or complex search needs. If this description fits you, you could order the creation of search features from a good Drupal team right now.

For more advanced search features, let’s move on to the next options.

Search API

Almost unlimited opportunities for searches in Drupal 8 are provided by the contributed Search API module. This flexible and extensible tool set is loved by Drupal developers, because it lets them create even the most complex search interfaces.

In Drupal 8, Search API unites the functions that used to be scattered around many Drupal 7 modules. For example, it allows you to provide multiple search indexes, which you used to need a separate Search API multi-index searches module. If you are also interested in Search API’s work in Drupal 7, here is a detailed overview by our developers.

If Search API is used, the core Search module should be uninstalled to avoid conflicts like duplicate indexing.

Search API now includes a Database Search submodule that provides a search backend. However, Database Search is the best fit for smaller sites, and larger ones would be better relying on more powerful and fast backends like Apache Solr or Elasticsearch.

Search API also comes packed with the Database Search Defaults module that helps with the default setup for Database Search. In addition, there is the Search API Taxonomy Term Handlers submodule that works with taxonomy.

It is awesome that Search API can index absolutely any imaginable entities in Drupal 8 from any desired data sources like content, custom blocks, comments, taxonomy, users, files, and more.

Search API lets you use highlighted search results, use stop words, apply transliteration, ignore the case, stem words for finding single-rooted words, split text into individual words — and that’s just the beginning of the out-of-box possibilities.

Combinations with other modules greatly enhance the powers of Search API. For example:

Finally, one of the greatest features of Search API is the ability to connect your site to famous search platforms like Apache Solr, Elasticsearch etc. Details are below.

Search API Solr Search

Apache Solr is a lightning-fast and powerful open-source search engine, based on Lucene and written in Java. Even websites with extremely high traffic or complex search queries are not a problem for it — Solr easily takes the load off their database.

Search features include faceted search, alternate spellings, content recommendations, highlighted results, attachment search, multisite search, and so much more.

For integrating Solr with Drupal websites, there is the Search API Solr Search module that provides a Solr backend. It work togethers with the Search API, and also needs an Apache Solr server.

By the way, we want to say congratulations on the fresh release of Search API Solr Search — on June 1, it got a stable 8.x-2.0 version!

Another great piece of news is that, as of version 8.x-2.x, the Search API Multilingual Solr Search module has merged into Search API Solr Search. It has a high level of support for non-English languages, cross-language information retrieval (CLIR) and a handy administrative interface.

We also shared with you a detailed review of Search API and Apache Solr in Drupal 7, so check that out if you are interested.

Facets

Amazon, Zappos, Walmart, eBay, and many other famous e-commerce websites have faceted searches. Basically, this means searching by multiple categories and parameters, which allows users to quickly sift out the unnecessary items and narrow down their results.

faceted search

The Facets module, created purely for Drupal 8, lets site builders create interesting faceted search interfaces. It works both with the core search and the Search API. Especially popular and powerful are faceted Solr search solutions, created in combination with Apache Solr and Search API.

Elasticsearch Connector

When it comes to search platforms, Elasticsearch is a great alternative to Solr. It is also very scalable, powerful, and flexible, based on Lucene, and written in Java. Elasticsearch can quickly index even large volumes of data. It is API-oriented and can be used with various programming languages.

Just like Solr, Elasticsearch has impressive and extensive search features. The nuances of differences between the two are worth a separate blog post. In any case, we can always help you choose what suits you best.

Of course, Drupal 8 has modules for Elasticsearch integration — for example, Elasticsearch Connector to be used together with Search API.

To recap

There are many other modules for searching in Drupal 8, and they combine with each to offer exactly what your website needs. Additional customization by developers can do miracles in fulfilling your wishes.

For choosing the suitable tools and applying them correctly, you can always rely on our Drupal web agency.

We have plenty of experience with Drupal search, including the creation of a large international multi-domain online store with custom facets and Solr.

It is easy to find us without special search features — we are always here for you! ;)

2 votes, Rating: 5

Read also

1

Sites have truly unlimited opportunities in Drupal 8 — they are not even limited by the “website” concept! They can go far beyond it, and easily exchange data with all imaginable applications....

2

Drupal lets you easily integrate social networks with your website. We have shared a great collection of Drupal social media integration modules in part 1 and 2. Time flies, and we would now like...

3

You can choose one of nice, free, ready-made Bootstrap-based themes for Drupal 8. They can also be further customized to your liking — by yourself or with the help of our Drupal developers. Let’s...

4

To honor the Drupal 8.5.0 release on March 7, we will not just describe what’s new in it. Drupal 8 has already had 5 awesome minor releases: Drupal 8.1.0, Drupal 8.2.0, Drupal 8.3.0, Drupal 8.4.0...

5

This was a blog post written by guest author Martin Postma (lolandese). He usually writes directly on Drupal.org as an author of documentation. Documentation is however not included on Drupal...

Subscribe to our blog updates