How to implement autocompletion and search suggestion in AEM through Lucene | Predictive Search in AEM | AEM Search Suggestions | AEM Community Blog Seeding | Community
Skip to main content
kautuk_sahni
Community Manager
Community Manager
June 29, 2020

How to implement autocompletion and search suggestion in AEM through Lucene | Predictive Search in AEM | AEM Search Suggestions | AEM Community Blog Seeding

  • June 29, 2020
  • 0 replies
  • 4868 views

BlogImage.jpg

How to implement autocompletion and search suggestion in AEM through Lucene | Predictive Search in AEM | AEM Search Suggestions by AlbinsBlog

Abstract

HOW TO IMPLEMENT AUTOCOMPLETION AND SEARCH SUGGESTION IN AEM THROUGH LUCENE | PREDICTIVE SEARCH IN AEM | AEM SEARCH SUGGESTIONS

This tutorial explain the approach to implement autocompletion and search suggestion in AEM through Lucene.

When you start typing something in search form most of the applications helps you by suggesting the data matching to your search term.
The purpose of autocomplete is to resolve a partial query , i.e., to search within a controlled vocabulary for items matching a given character string.

Starting from AEM 6.1 the feature of suggestion is available through the suggest module of Lucene. Prior to AEM 6.1, all the possible combination of the words needs to be indexed to support the autocompletion.

The Lucene Suggest module provides a dedicated and optimized data structure allows the engine to give autocompletion and suggestion feature without indexing all the possible combination of a word.

There is a specific analyzer (AnalyzingInfixSuggester) used that loads the completion values from the indexed data and then build the optimized structure in memory for a fast lookup.

In order to implements the autosuggestion, feature you need to define an index of type Lucene and for each property X of nodes that you are indexing you can add a specific property useInSuggest to tell to the engine to use X for suggesting query to the user.

Refer the following URL for details on enabling custom index - https://www.albinsblog.com/2020/04/oak-lucene-index-improve-query-in-aem-configure-lucene-index.html

Read Full Blog

How to implement autocompletion and search suggestion in AEM through Lucene | Predictive Search in AEM | AEM Search Suggestions

Q&A

Please use this thread to ask the related questions.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.