Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

Want to exclude page from search in search component of AEM.

Avatar

Level 2

Hi Team,

 

We are using AEM 6.5 and We have a component called search where we will give path to search, So based on given word which we want to search the search will traverse through the given path and show us result of all the pages which comes under given path.

But We want to exclude some pages that comes under given path and don't want the contents of such page to come as search result.

e.g.: In Search component we give search path as  http://localhost:4502/sites.html/content/we-retail/us/en/products and we want to exclude http://localhost:4502/sites.html/content/we-retail/us/en/products/equipment/running this page from our search.

 

How could we do that, Please help on that.

 

Thanks,

Tarique

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You need to modify the search logic to create query with exclude path also, something like

 

1_property=property-name
1_property.value=property-value
path=/content/mysite/en
group.1_group.p.not=true
group.1_group.path=/content/mysite/en/testfolder1
group.1_group.path.self=true

View solution in original post

1 Reply

Avatar

Correct answer by
Employee Advisor

You need to modify the search logic to create query with exclude path also, something like

 

1_property=property-name
1_property.value=property-value
path=/content/mysite/en
group.1_group.p.not=true
group.1_group.path=/content/mysite/en/testfolder1
group.1_group.path.self=true