Reputation: 2996
I am implementing an auto-suggest facility for a search input box using CQ5.5.
This article on Predictive Search mentions a search/suggestion component in AEM (5.6), which seems to be present in CQ5.5, but missing the com.day.cq.search.suggest.impl.SuggestionIndexManager
service dependencies it requires.
Is it possible to add this facility through some add-on package or alternative CQ5.5 feature?
It seems that the underlying Lucene suggest API does not seem to be exposed, but perhaps there some Jackrabbit API that I could use?
Upvotes: 1
Views: 1577
Reputation: 3714
It is out of the box available starting with CQ/AEM 5.6. For 5.5 (and even 5.4 IIRC) it is available as a feature pack to customers (cq search suggestions). Please contact daycare or the usual channels.
The way it works is that it can store an auto-complete word index in the repository (an optimized JCR structure is used here, no Lucene et. al.). To populate this index an API can be used by passing words and their frequencies, e.g. based on the frequency that search terms are actually searched for by end users (Google-style, only works well if you have many searches going on).
Another way or the way to build an initial index is provided which reads the custom Lucene index maintained by Jackrabbit.
Upvotes: 3