Search Bar Suggestions Blueprints
Subscription 7.4 U36+ and GA36+
Search Bar Suggestions uses the regular search bar query by default. Liferay Enterprise Search users can influence or override the query using Search Blueprints.
First, build a Blueprint. Once you have a Blueprint,
-
Make sure Search Bar Suggestions are enabled in Instance Settings. They are enabled by default.
-
Configure Search Bar Suggestions in the Search Bar widget configuration.
- Click the Options () menu and choose Configuration.
-
Change the Suggestions Contributor to Blueprint.
-
Select the Blueprint by clicking Select.
-
Click Save.
Now the Search Bar Suggestions use the Blueprint-provided query clauses and configurations to send a customized request to Elasticsearch.
There are a few additional configurations you can use.
Configuring Search Bar Suggestions to use a Blueprint
When you select the Blueprint Suggestions Contributor, new configuration fields appear in the Search Bar Widget Configuration.
Blueprint: This is the only required additional setting. Select the Blueprint to use.
Include Asset URL: Enable this to return the link to the result with the response. If an asset appears on a page accessible to the search user, clicking a result brings the user to that display page. Otherwise the asset is shown in an Asset Publisher under the search page’s context. If disabled, clicking on results in the Suggestions list does nothing.
Include Asset Summary: Enable this to return the summary of the result with the response. Disable this to return a more concise list of results, excluding the summary built by the search framework.
Fields: Define additional indexed fields to also return with the response. This is used when creating a custom widget template that requires the use of certain index fields and their values.