Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.

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.