Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Exclude pages from search and suggestions

Avatar

Level 2

Hi,

We are using OOTB lucene to index the pages and properties. We have a requirement to exclude paths from search index dynamically. i.e the list of paths are not fixed and does not fall under a particular folder. The author should have an option to exclude any page from search at any moment. Due to this, the option to use excludePaths in the index node is not feasible.

We have introduced a property 'excludeinSearch' in page properties and restricting the search results by querying based on this property value. But the same doesn't work for Suggestions. Is there any way to customize the suggestions based on a property in page?

I believe it is difficult to restrict during the query time. Because the below query doesn't yield any result and it doesn't make sense. Because the suggestion dictionary might not be aware of the property.

SELECT [rep:suggest()] as suggestion FROM [cq:Page] as s WHERE ISDESCENDANTNODE(s, '/content/project/') AND suggest('test') AND s.excludeinSearch=false.

Can we make any customization to ignore the pages with this property from lucene index during reindexing time?

Thanks in advance.

4 Replies

Avatar

Level 2

Hi Hamid,

Thanks for your response. The above link seems to be configurations specific to versions <= CQ 5.5. We are using AEM 6.3 and not sure whether the same applicable here?

Thanks!

Avatar

Employee

The idea is the same ... there might be some path diff that should be adjusted accordingly. There is no updated document as far as I can tell.

Avatar

Level 2

Hi @Boobalan_M ,

I have exactly similar requirement and struggling to achieve this.

Could you please tell me if you got any solution for this.

 

Thanks in advance