Issue
- How Blueprints Work in Liferay while using Fuzziness?
Environment
- Liferay Quarterly Release
Resolution
Example case:
1.) Create new environment.
2.) Create new blueprint
3.) Open preview
4.) Add Text Match Over Multiple Fields
5.) Fuzziness : auto (or any other value)
6.) Open preview
7.) Search on Enjoy : you should get the homepage (screenshot)
8.) Search on Enjot : you get no results even though it is only 1 letter difference (screenshot)
Example explained:
When you perform a search in Liferay, the system doesn’t start from scratch. Instead, it generates a standard base query that’s used for all searches. This default query is designed to provide the best possible search experience by including essential elements such as:
- Relevance: Prioritizing the most useful or likely results.
- Security and Permissions: Ensuring users only see content they are authorized to view.
- Performance and Integrity Measures: Supporting efficient and accurate results.
When you apply a Blueprint, it doesn't replace this standard query. Rather, it adds new rules and conditions on top of the existing query. Think of it as a layer of customization or enhancement.
A search for “enjoy” returns three results. A Blueprint can't add new documents, only refine or re-rank what the base query finds. For example, it can:
- Reorder results by adjusting scores
- Filter results further
In our case, searching for “enjot” returned nothing because the base query didn’t recognize it. Though your Blueprint added fuzziness (to catch near matches like “enjot” → “enjoy”), it still depends on the base query. If that excludes a document, the Blueprint can’t bring it back. Since the base query returned nothing, there was nothing for fuzziness to work on.
Additional Information