Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Hide Products/Page in JCR Query Search

rajeev6969
Level 2
Level 2

I  want to create custom JCR query search for products/pages. In search results, I dont want to display certain pages/products. What is the best way to do it?

1 Accepted Solution
Opkar_Gill
Correct answer by
Employee
Employee

Hi,

how are you going to differentiate between what you want to return and what you want to exclude?

If you have a property that identifies a product for exclusion then you can write a custom predicate[1][2]

Regards,

Opkar

[1]https://docs.adobe.com/docs/en/aem/6-1/develop/search/implementing-custom-predicate-evaluator.html

[2] http://labs.6dglobal.com/blog/2013-07-10/custom-predicateevaluators-or-how-i-learned-stop-worrying-a...

View solution in original post

2 Replies
Opkar_Gill
Correct answer by
Employee
Employee

Hi,

how are you going to differentiate between what you want to return and what you want to exclude?

If you have a property that identifies a product for exclusion then you can write a custom predicate[1][2]

Regards,

Opkar

[1]https://docs.adobe.com/docs/en/aem/6-1/develop/search/implementing-custom-predicate-evaluator.html

[2] http://labs.6dglobal.com/blog/2013-07-10/custom-predicateevaluators-or-how-i-learned-stop-worrying-a...

View solution in original post

rajeevy89244319
Level 3
Level 3

I want to pass certain page paths that are configured to be excluded. There is no property to identify if that path needs to be excluded. Authors can configure the list of paths that they don't want to see in the search results.