Want to exclude page from search in search component of AEM. | Community
Skip to main content
Level 2
November 17, 2022
Solved

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

  • November 17, 2022
  • 1 reply
  • 980 views

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

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 Mohit_KBansal

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

1 reply

Mohit_KBansal
Adobe Employee
Mohit_KBansalAdobe EmployeeAccepted solution
Adobe Employee
November 17, 2022

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