1 / 7

Liferay Search Blueprint: Improving the Search Experience

Life Search Blueprints: A Liferay search blueprint is a method to optimize liferay behaviour. Basically, used when users type search term in Search bar to improving the Search results.

inextures
Télécharger la présentation

Liferay Search Blueprint: Improving the Search Experience

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Liferay Search Blueprint: Improving the Search Experience A Search Blueprint is a design plan for Liferay’s search behavior. The search experience starts at a Search Bar for most users. When a search term is entered, a complex query is constructed by Liferay’s search infrastructure, then sent to the search engine. You can see Liferay’s complete query using the Search Insights widget. This query can be thought of as Liferay’s default blueprint for the search page, controlling what is searched and how. This document/blog will provide a comprehensive guide to Liferay Search Blueprint. We will cover the following topics: •How does search work in Liferay? •How to create a Liferay Search Blueprint. •What Can I Do in the Blueprints UI? •Advanced: Configuring Query Clause Contributors •Search Blueprints Configuration Reference. •How to apply search blueprint into search page. •Search Blueprint use case.

  2. How does search work in Liferay? Search Request: Liferay sends a search request to Elasticsearch, which can include the query body and additional parameters that help direct the response returned by Elasticsearch. Query: The query body instructs the search in how to determine if matching content is found in the index. For example, what kind of query should be used when searching indexed content containing a title field? And if it matches the title field, should the score be boosted? Clause: A clause is a self-contained portion of the main bool query. Most often one of the more nested queries is what’s referred to when the word clause is invoked. What Can I Do in the Blueprints UI? Create an element-based Blueprint, then apply it to the page to create a search solution. The features available for doing so include:

  3. Blueprints are made up of Elements with some additional settings on top. Elements: Elements are visual building blocks that combine to build an entire Blueprint. Each Element is backed by a JSON fragment that defines a concrete search behavior. Elements are provided out of the box with Search Experiences, and an Element editor lets you create your own or duplicate the existing elements to use as starting points for your own needs. We can also include our own unique element clicking (+) button. Advanced: Configuring Query Clause Contributors Liferay’s back-end code (and potentially any custom applications deployed in your Liferay instance) contributes query clauses to the ongoing search. These clauses contributed by the back-end can be configured via Search Blueprints. However, most users should never touch two settings: •Search Framework Indexer Clauses •Search Framework Query Contributors Liferay’s back-end code (and potentially any custom applications deployed in your Liferay instance) contributes query clauses to the ongoing search.

  4. These clauses contributed by the back-end can be configured via Search Blueprints. However, most users should never touch two settings: •Search Framework Indexer Clauses •Search Framework Query Contributors The default settings are usually enough. If you’re sure you must tweak this behavior beyond using the Searchable Types, you must understand the way these back-end contributors work: 1.Use Searchable Types to disable individual indexers from participating in the search. If you disable a type’s indexer, no clauses for the type are added to the search query, even if its Query Contributors are selected. Results for these types do not appear for users. 2.Use Search Framework Indexer Clausesto disable all Liferay’s indexers from contributing clauses to the search. The only reason to disable all indexers is to build a search query from scratch, disabling all Query Contributors and Searchable Assets as well. 3.Use the Search Framework Query Contributors section to remove certain contributors from participating in the search. Disable certain clause contributors if you want to override them using your own Blueprints configuration, or disable all clauses to completely override Liferay’s search behavior, disabling Liferay’s Indexers and Searchable Types as well.

  5. As an example, if the administrator does not want Liferay to create articleId clauses in request queries, we can disable the journal article query contributor setting. See the image below.

  6. After that setting liferay not including below clauses into search query. You can also verify that by adding a search insight widget to the search page and see the search request query string. {"bool": { "should": [ {"match_phrase": {"articleId": { "query": "kotlin", "slop": 50 }}}, {"match_phrase": {"articleId": { "query": "kotlin", "boost": 2 }}} ], "must": [{"match": {"articleId": {"query": "kotlin"}}}] }}, Creating Search Blueprints To create Search Blueprints, 1.Open the Blueprints application by clicking Blueprints from Global Menu → Applications (Search Experiences). 2.Add a Blueprint by clicking Add ().

  7. 3.In the New Search Blueprint window, give the Blueprint a name (required) and a description (optional). 4.Depending on your Blueprint plan, next you’ll use these menus to continue building the Blueprint: a. Query Builder: in the Query Elements section, add new query clauses to the search by choosing or composing Elements for the Blueprint. In the Query Settings section, configure additional settings for the query (like which asset and object types to search). b. Configuration: Configure advanced settings (e.g., Sorts or Aggregations) in the search. 5.Once you’re finished with the initial Blueprint creation, Click Save. Conclusion In conclusion, Liferay Search Blueprint is a powerful tool that enables organizations to customize and improve the search experience within their Liferay portal. By creating a blueprint, administrators can define the search behavior, control what is searched and how, and enhance the relevance and personalization of search results. We can also define aggregation, sort, and highlights in query. Originally published by: Liferay Search Blueprint: Improving the Search Experience

More Related