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.
SOLVED

Hide Products/Page in JCR Query Search

Avatar

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

Avatar

Correct answer by
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

Avatar

Correct answer by
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...

Avatar

Level 4

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.