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,

  1. Create a blueprint.

  2. Create or navigate to the search page.

  3. Add the Blueprint Options widget to the page.

  4. Click the widget’s Options icon (Options) and click Configuration.

  5. To choose a blueprint for the page, click Select.

    Select a blueprint for use on the page.

  6. 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)]

The blueprint ID and ERC are listed in the blueprint editor.

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:

  1. 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.

  2. 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.


  1. 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.

Capabilities

Product

Contact Us

Connect

Powered by Liferay
© 2024 Liferay Inc. All Rights Reserved • Privacy Policy