Loading Audio...

Listen to Lesson
0:00
  • Speed 0.5x
  • Speed 0.75x
  • Speed 1x
  • Speed 1.25x
  • Speed 1.5x
  • Speed 2x
  • Brian
  • Caris

Understanding Liferay Search

Searching for content is one of the most important experiences users can have on your site. When successful, site search can effectively spotlight your valuable content and engage visitors. When ineffective, users are likely to leave your site when they can’t find what they’re looking for. Understanding how Liferay’s search works is the first step in delivering a successful search experience.

In this lesson, you’ll explore how Liferay’s search works and how it can support your content strategy.

By default, Liferay search leverages Elasticsearch, a powerful open-source search and analytics engine. To provide fast and efficient results, Liferay indexes its content into this search engine. This means information is converted into a highly optimized format for quick retrieval. In this context, most indexed content in Liferay can be referred to as an asset, including web content articles, files, products, pages, user profiles, and more.

To provide fast and efficient results, Liferay indexes its content into this Elasticsearch.

Liferay search is ready to use right out of the box, but its real power lies in its flexibility. With granular configuration options, you can fine-tune your search experiences at the page, site, or instance level. Liferay also offers a rich set of tools for refining results with facets and sorting, and advanced features like Search Blueprints for deep personalization—all without requiring custom development.

Key Components of Search Experiences

A user's search journey generally begins with a search bar that leads to a dedicated search page. While search pages can vary in their design and purpose, they generally share several key elements. Understanding each one is essential for building an effective and intuitive experience.

Users begin their search for content by typing their query into a Search Bar widget. When building a Liferay page, you can configure this widget’s scope to determine which content is searched.

Searching for a phrase provides suggestions with content matching the Search Bar's scope.

The Search Bar includes these scope options:

  • This Site: Restricts search results to only include content from the current site. For example, a search on Clarity's public site not show results from their private employee intranet and vice versa.
  • Everything: Expands the search to the entire Liferay instance, returning results from all sites the user has permission to view.
  • Let the User Choose: Provides a drop-down menu in the search bar for users to select the scope of their own query.

Liferay UI screenshot: scope options included in the drop down menu.

Scope has a huge impact on search results. If the search seems to be missing content, it might just be outside of the currently configured scope.

Search Results

After a user submits a query, the search page displays a list of matching assets using the Search Results widget. Each result typically includes a title and a brief summary to help users evaluate its relevance. By default, Liferay displays results from multiple asset types (e.g., documents, web content, blog posts), though you can use other search elements to refine the results. Also, this list automatically orders assets by a calculated relevance score.

Returned search results are listed with a title, brief summary, and result metadata.

An important part of the search experience is what happens when users click on search results. By default, users are navigated away from the search context to each item’s dedicated page. However, you can configure this behavior in the Search Results widget. Instead of sending users to a different page, you can configure the widget to display a summary of each item while preserving their search context.

If configured, clicking on a search result directs users to a summary of the item.

Search Facets

The Search Facets provide clickable filters for narrowing down search results. They are a crucial part of a search experience because they empower users to quickly refine their own results based on specific criteria. These facets are based on your content’s metadata. Common examples include asset type (e.g., web content, documents), categories, tags, and dates. For example, a Clarity customer searching for ‘eyewear’ could use a “Product Type” facet to narrow the results to show only sunglasses or contact lenses. You can also create custom facets for fields that aren't available by default. Together, these facets transform a simple list of search results into an interactive discovery tool.

Liferay UI screenshot: Available facets are listed in the left sidebar.

Why Search Matters for Content Management

Good content is only valuable if people can find it. As your site grows with new products, help articles, and documentation, the challenge of discoverability grows with it. Liferay search acts as a bridge between your content strategy and your user experience.

For example, a well-written article on “How to adjust your glasses at home” is only effective if a user can find it when they search for “loose glasses” or “fix glasses yourself.” Similarly, if a customer cannot find a return policy through navigation, they will almost certainly use the search bar. Whether they find that document or abandon your site depends on your search configuration.

Everything you do plays a role in how easy it is for users to search and find the content. Liferay’s search system draws on your content to match assets to user queries.

Conclusion

Liferay provides powerful search capabilities that empower you to design effective search experiences. By understanding the basic components of the search experience (e.g., search bar, results, facets), you can better determine how to design effective search solutions.

Next, you’ll learn how to optimize your site’s content to improve its discoverability in search.

loading-knowledge-label