Leveraging Search Blueprints

Easy search experience using Search Blueprints

What is a Search Blueprint?

Search Blueprints is the first feature of the Search Experiences tool set. Search Blueprint is used to customize the search experience without deploying code to the portal.

 

How can we set up Blueprints?

To access the Blueprints, navigate to Application > Search experiences > Blueprints

  • From this page, we can create new blueprints. While creating blueprints, it will ask for basic details, like below.

  • Once it is saved, it will open a panel like below.

 

Under Query elements, we can set up boost, condition, filter, hide, match, and custom.

 

Boost:

  • We can boost the particular record by adding a boost here.

  • For now, I will boost the documents, and for that, I will add “Boost Asset Type” on the element section and select Document from the drop-down.

 

Conditional:

  • We can add different types of conditions based on keywords and categories.

  • For now, we will hide the content of the private category when the user is not logged in.

 

Filter:

  • We can add various filters to this section to limit the results.

  • For now, we will restrict the records to the user’s site.

 

Hide:

  • We can hide particular records by adding one of these items.

  • For now, we will hide content which is marked as not searchable

 

Match:

  • It allows you to add custom match query to the search operation

  • We can select fields that we want to add; we can select operator, boost, fuzziness, slop, etc.

 

Custom:

  • Allows you to add a custom elastic search query itself.


 

Also, we can have some query settings for Search Blueprints, Right now, I just kept the default one.

 

Custom configurations like aggregation, highlight, sort, and parameter can be added from the configurations section.

 

Custom elements (that can be used in Blueprints) can be created from the Elements tab of this page

 

How can we use it?

On the search page, we can drop the blueprints options portlet (OOTB) and configure your blueprints from there.

Once configurations are done, we can start using search, and it will follow your custom rules added in Blueprints.

 

What are the advantages?

  • Users with knowledge of the Liferay control panel can do this configuration, as no code change is required.

  • We don’t need to run through the deployment cycle when we need to customize the basic search.

  • Allows you to create a custom element set that can be used in Blueprints.

  • It is a faster process for setting up the search experience.