Lots of new and improved search capabilities are present in Liferay DXP 7.2, from new widgets to new APIs and infrastructure.
Add search widgets by clicking the Add () icon on the page. Then expand the Widgets → Search section.
Add a widget to the page for each of the filters you’d like applied to the search results. Let search page users see and manipulate the filters or make them invisible and/or immutable (this is just a cool word for “they can’t be changed”).
For example, add a custom filter to ensure that all returned results have the keyword street in the content field.
The Sort widget reorders the results based on the value of certain
fields in the index. For example, show results in alphabetic order of the Title
field. The default order is determined by the search engine’s Relevance
Add more fields to the sort widget if the default options aren’t enough. Click
the widget Options () menu →
Configuration. Enter a human readable label and the
fieldName to sort by. Just
make sure it’s a
Past versions of Search Insights showed you the full query string sent to the search engine, but now it also displays the response from the search engine with an explanation of the score for each search hit.
The Search Admin functionality is found in Control Panel → Configuration → Search.
The displayed Search Engine information is enhanced, showing the client and node information as well as the vendor and operation mode.
The Field Mappings tab shows the field mappings for all indexes in the search engine.
Indexing now displays a progress bar so you can see in the UI when the re-indexing action has completed.
Access the Search System Settings at Control Panel → Configuration → System Settings → Search.
There’s a new entry in the search category: Title Field Query Builder. Use it to configure how search responds to matches on the Title field of a document.
Exact Match boost: Give an additional boost when searched keywords exactly
title field of a document.
Maximum Expansions: Limit the number of documents to return when matching
searched keywords to the
title field as a phrase prefix. See Elasticsearch’s
Match Phrase Query
for more information.
There are some important search infrastructure changes to know about.
Liferay DXP 7.2 supports Elasticsearch 6.5.x through 6.8.x, and 6.5.0 is included as the embedded version to use for testing out-of-the-box search behavior. See the deployment guide for more information.
You’ll notice more search indexes in Liferay DXP 7.2. That’s because you can now
configure application-specific indexes. At the time of this writing, the
additional indexes are all related to the DXP Workflow Metrics feature. More
will likely appear in future versions, and third party developers can use the
portal-search APIs to create their own indexes. It’s under development, so
visit the Search Framework
frequently to discover new search infrastructure changes that expose more
functionality for developers.
Enhancements to the search framework APIs include
- Low level indexing and queries
- Operations directly on indexed documents (no need for the Indexer framework)
- New Aggregation types
Liferay DXP’s support for multi-language search took a step forward, with improvements to Documents and Media and Web Content. More improvements are necessary in this area and will be prioritized in future releases. See the Multi-Language Search article for more information.