Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.

AEM 6.2 suggest query

Avatar

Level 1

Hi Team,

I am able to get the suggestion for the keyword using the following query

SELECT [rep:suggest()] as suggestion FROM [cq:Page] as s WHERE ISDESCENDANTNODE(s,'/content') AND suggest('geomettrix')

However I want the node path of the results.

So the above query provide me the page title only but not the path of the traversed nodes.

Note : I have indexed the jcr:title with useInsuggest property.

Can anybody please help me with it.

Thanks

Yuvraj

2 Replies

Avatar

Level 9

Hi Yuvraj,

Is column selector specify multiple columns and verify.

SELECT [rep:suggest()] as suggestion, [jcr:path] FROM [cq:Page] as s WHERE ISDESCENDANTNODE(s,'/content') AND suggest('geomettrix')

Thanks,

Avatar

Level 1

Thanks for the reply MC Stuff.

I tried with multiple selector as well but it do not gives jcr:path and the value is blank.