Highlighted

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

Avatar

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

962

Correct Answer

1.1K

Avatar

kautuk_sahni

Community Manager

Total Posts

5.6K

Likes

962

Correct Answer

1.1K
kautuk_sahni
Community Manager

28-06-2020

BlogImage.jpg

How to implement autocompletion and search suggestion in AEM through Lucene | Predictive Search in A... 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 A...

Q&A

Please use this thread to ask the related questions.

AEM AEMEBlogSeeding Experience Manager