Our documentation has been relocated here, the Liferay Developer Network. Please update your bookmarks!

Sites often feature lots of content split over lots of asset types. Web content articles, documents and media files, and blogs entries are just a few examples. Most content types are assets. Under the hood, assets use the Asset API and have an Indexer class. Any content that has these features can be searched.

search-assets.png

Figure 1: The Type Facet configuration lists the searchable out-of-the-box asset types.

Elasticsearch

The default search engine is Elasticsearch, which is backed by the Lucene search library. There’s an Elasticsearch server embedded in all bundles, which is handy for testing and development purposes. Production environments must install a separate, remote Elasticsearch server (or even better, cluster of servers). For information on how to install Elasticsearch, read the deployment guide.

Search Features

Searching is simple and straightforward. Find a search bar (there’s one embedded in every page by default), enter a term, and click Enter.

search-bar.png

Figure 2: There’s a search bar embedded on all pages by default.

After search is triggered, a results page appears. If there are hits to search engine documents, they appear as search results in the right hand column. In the left hand column are search facets.

search-results.png

Figure 3: Results are displayed in the Search Results portlet.

The search bar, search results, and search facets make up three powerful features in the search UI.

Search Bar

The search bar is simple: it’s where you enter search terms. Search terms are the text you send to the search engine to match against the documents in the index.

Search Results and Relevance

The search term is processed by an algorithm in the search engine, and search results are returned to users in order of relevance. Relevance is determined by a document’s score, generated against the search query. The higher the score, the more relevant a document is considered. The particular relevance algorithm used is dependent on algorithms provided by the search engine (Elasticsearch by default).

Search Facets

Facets allow users of the Search application to filter search results. Think of facets as buckets that hold similar search results. You might want to see the results in all the buckets, but after scanning the results, you might decide that the results of just one bucket better represent what you want. So what facets are included out of the box?

  • Category
  • Folder
  • Site
  • Tag
  • Type
  • User
  • Modified
  • Custom

search-faceted-search.png

Figure 4: Site and Type are two of the facet sets you’ll encounter. They let you drill down to results that contain the search terms you entered.

You’ve probably used something similar on any number of sites. You search for an item, are presented with a list of results, and a list of buckets you can click to further drill down into the search results, without entering additional search terms. Search facets work the same way. Facets are, of course, configurable.

What’s New with Search?

There are lots of new features in the search functionality. This brief overview can get you familiar with the changes. More details are in the remaining articles. Modularized Search Functionality :...

Read More

Configuring Search Pages

There are multiple ways to skin the search cat (disclaimer: no actual cats have been harmed during the writing of this article). If you’re unsure which approach to take, use the default...

Read More

Searching for Assets

As explained in the Search introduction, all indexed assets can be returned as search results. Developers can create their own assets, so your installation might have additional asset types beyond...

Read More

Facets

Enter a keyword in the Search Bar and click the Search button (). The default search experience redirects to a page with results on the right and a collection of facets on the left. Figure 1: Site...

Read More

Configuring Search

Configuring Search could mean lots of different things: System scoped search configuration Reindexing to make sure the search indexes are current with the database Tweaking the search widgets added...

Read More

Search Results

The ideal search experience involves a User entering a search term, waiting an infinitesimal amount of time, and having the perfectly matching asset delivered at the top of a list of other...

Read More
0 (0 Votes)
Creating A Social Network Previous