O'Reilly logo

Drupal 8 Development Beginner's Guide - Second Edition by Kurt Madel, Malabya Tewari, Rakesh James, Krishna Kanth, Edward Crompton, Samuel Keen, Tassos Koutlas, Neeraj Kumar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Exposing the search to users

So now we have a search index with content in it, but how do we actually allow the end users to perform a search on our Drupal site?

One of the features of Search API is that it integrates well with the Views module. This means that you can search content using the search server you set up and display it in a view. The search_api_db_defaults module that you used earlier provides some views configuration which implements the search index and search server that was configured.

To see this View, go to /search/content on your site. Try searching the content for a certain word and check that you get sensible results. You should find that if you have two items of content, one of which has your search keyword in the title and ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required