Using a Search Blueprint on a Search Page
By default, a search page does not have a search blueprint associated with it. A blueprint must be applied to a search page to affect the Liferay search experience. If a site has multiple search pages, follow the steps below on each page that should use a blueprint, as each must be configured separately. You can use different blueprints on each page, if desired.
To make the search page react to your search blueprint,
-
Create or navigate to the search page.
-
Add the Blueprint Options widget to the page.
-
Click the widget’s Options icon () and click Configuration.
NoteBefore Liferay DXP 2025.Q1, the Configuration option appeared in the widget’s top-right corner.
-
To choose a blueprint for the page, click Select.
-
Once the blueprint is selected, click Save on the Configuration screen.
Now the blueprint’s functionality is applied to the page.
Administrative users can instead use the Low Level Search Options widget to apply a blueprint to a search page. Open the widget’s configuration. In the Attributes section, add
- Key:
search.experiences.blueprint.erc
1 - Value:
[the blueprint's external reference code (ERC)]
Unless you’re already using the Low Level Search Options widget on your search page, the Blueprints Options widget is more convenient for setting a blueprint. If you must set other Search Context Attributes, perhaps for testing a blueprint, use the Low Level Search Options widget.
Applying Additional Search Context Attributes
Blueprints are applied to the page using the Blueprints Options widget, or using a search context attribute in the Low Level Search Options widget, as described above. You can set additional search context attributes in the Low Level Search Options widget. There are two primary reasons you might need to set search context attributes into the search page:
-
A blueprint can define and respond to a custom parameter (one that isn’t set by Liferay’s search framework), and these can be set manually in the Low Level Search Options widget.
-
It can be useful to test the behavior of the blueprint on the search page by setting search context attributes and executing a search request.
See the Elements reference for more information about the parameters used by the out-of-the-box elements.
-
On versions before Liferay 2023.Q4/GA102, you must instead use the ID:
↩search.experiences.blueprint.id
. You can find the blueprint ID or ERC from the Blueprints application (Global Menu → Applications → Blueprints (Search Experiences)). Click the blueprint to open its editor.