Search

The definition of “what a search page is” varies from project to project. Some clients are happy with the core Search module, others want a full blown search engine.

Drupal offers a wide range of options when it comes to building custom search pages. You can create a basic search page using the core Search module or if you’re looking for something advanced you could use Search API.

Building a search page isn’t as straight forward as you’d think. At first a client will want something which users can search content, then they may want to modify the search results or even change the ranking of certain content. Long story short, something you thought would be as simple as enabling a module, ends up taking twice as long.

If you need to create custom search pages in Drupal 7, more often than not, you use Search API or create a search page using Views. But the core Search module for Drupal 8 has become more powerful than in Drupal 7. One of the big changes, for site builders, in Drupal 8 is the ability to create custom search pages.

However, there’re a few limitations to creating a search page. First, it’ll have a prefix of “search/” in front but the full URL can be changed by creating a URL alias. Second, you can only adjust the content ranking on these pages. If you want to index extra fields or remove ones from being indexed, you’ll still need Search API to do this.

In this tutorial, you’ll learn how to create a custom search page and how to modify the search results by overriding a template.

Search API has been my go-to module for building search pages for the last two years. Even if the client doesn’t ask for anything fancy, I still download and install Search API, use Database Search for the index and Views for the page.

If you start with Search API from the beginning, then it’s easier to customise later on. The core Search module, on the other hand, is easy to setup but hard to modify.

Recently, I had to create a search page that highlighted the keywords in the results. If you search using a particular keyword, then the word is highlighted.

Being able to track search queries in Drupal can give you valuable insight into what your users want or need.

Let’s say for example your website only sells red bicycles, but you notice that users are always searching for yellow bicycles. This type of insight into what your users are searching for can be very useful.

In Drupal there are a few modules that can help you track keywords used on a search page. In this article, you’ll learn about a few of these modules and how to track searches using just Google Analytics

In this tutorial I’ll show you how to setup a local development Solr server on Mac OS X 10.8.3.

Please note that this tutorial should only be used to setup a development server where you’re not worried about locking down Solr. If you want to setup Solr for a production site, then make sure you lock down the server so users can not get access to Solr.

The Search API ranges module allows you to easily create a search API page with a range facet. For example, you could create a search page where users can filter products based on price, by simply selecting a price range from a facet.

The Commerce Kickstart distribution uses this module for price filtering on their product search page. If you want to see the facet in action go to the Commerce Kickstart demo site and you should see the Price facet in the left sidebar.

A while ago I wrote two tutorials on using the Search API module. In the first tutorial, we created a custom search page using just Views and a Search API index. In the second, we looked at faceted search using the Facet API module.

Search API can be tough to setup especially for new users to Drupal. For example, you need to understand the difference between a Search API Server and Index, and then you need to spend time configuring everything.

In this tutorial, I’ll show you how to create a search page using just Views and Drupal’s core Search module.

In part one of this series, we used Search API and Views to create a custom search page. The page is fairly basic, however it gives you a great introduction into how Search API works.

In this tutorial, we’ll add faceted search to our custom search page using the Facet API. Luckily for us, Search API and Facet API work brilliantly together so setting up faceted search is pretty easy.

The core Search module in Drupal 7 is great for simple search pages however, the configuration options are fairly limited. If you want to change the look and feel of the search results, you could use the Display Suite Search sub-module that ships with Display Suite.

You can go one step further and create a custom search page using just Views. All you need to do is create a page display and expose the Search: Search Terms filter, and you’re done. But the filter still relies on the index data that the Search module creates.