Trying to use suggestion index API in AEM 6.1 to rebuild index or add terms, but no luck. | Community
Skip to main content
adobecq-venkat
Level 2
May 16, 2017
Solved

Trying to use suggestion index API in AEM 6.1 to rebuild index or add terms, but no luck.

  • May 16, 2017
  • 3 replies
  • 1809 views

Hi, I am trying to implement auto suggest in AEM 6.1. I tried "/jcr:root[rep:suggest('term')]/(rep:suggest())" and it seems to do what it is supposed to do.

I get all the suggestions for a given term. The index breaks down all words by space etc..

I need to have following features:

  • I wanted to get suggestions for multi words or sentence.
  • Also I wanted to stored frequently used search terms.
  • Also wanted to get the URL along with suggestion so that I can directly take the user to the URL for the most frequently used terms.

I couldn't find much help online or in adobe forums.

Any help in this regard is highly appreciated. 

Thanks

Venkat

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

Hi Venkat,

Sorry I misread your original request. You are looking some thing like [A] which is not yet in AEM6x.  Adobe can confirm the feature GRANITE-7057 status. 

[A]   http://aemfaq.blogspot.com/2013/07/predictive-search.html

Thanks

3 replies

MC_Stuff
Level 10
May 16, 2017

Hi Venkat,

Post your index defnition. 

Thanks,

adobecq-venkat
Level 2
May 16, 2017

Here is the configuration:

<lucene-suggest
        jcr:primaryType="oak:QueryIndexDefinition"
        async="async"
        compatVersion="{Long}2"
        evaluatePathRestrictions="{Boolean}true"
        includedPaths="[/content/mysite/en/home]"
        reindex="{Boolean}false"
        reindexCount="{Long}20"
        type="lucene">
        <indexRules jcr:primaryType="nt:unstructured">
            <nt:base jcr:primaryType="nt:unstructured">
                <properties jcr:primaryType="nt:unstructured">
                    <jcr:description
                        jcr:primaryType="nt:unstructured"
                        analyzed="{Boolean}true"
                        evaluatePathRestrictions="{Boolean}true"
                        propertyIndex="{Boolean}true"
                        useInSpellcheck="{Boolean}true"
                        useInSuggest="{Boolean}true"/>
                    <jcr:title
                        jcr:primaryType="nt:unstructured"
                        analyzed="{Boolean}true"
                        evaluatePathRestrictions="{Boolean}true"
                        propertyIndex="{Boolean}true"
                        useInSuggest="{Boolean}true"/>
                </properties>
            </nt:base>
        </indexRules>
        <suggestion
            jcr:primaryType="nt:unstructured"
            suggestAnalyzed="{Boolean}true"
            suggestUpdateFrequencyMinutes="{Long}20"/>
    </lucene-suggest>

MC_Stuff
MC_StuffAccepted solution
Level 10
May 17, 2017

Hi Venkat,

Sorry I misread your original request. You are looking some thing like [A] which is not yet in AEM6x.  Adobe can confirm the feature GRANITE-7057 status. 

[A]   http://aemfaq.blogspot.com/2013/07/predictive-search.html

Thanks