Search code examples
javaatgendecaoracle-commerce

How to filter endeca (ATG) records (/browse page)


I want to display only a few products on /browse page. This page is coming from endeca cartridge configuration. I want to intercept the result returned by endeca and add my custom logic to decide which product will be displayed and which can not be.

My logic to decide which product to show on the catalog is dependent on the data which is dynamic and can not be indexed in endeca.

Framework Stack:

Oracle Commerce: 11.2

CAS: 11.2.0

MDEX: 6.5.2

PlatformServices: 11.2.0

ToolsAndFramework: 11.2.0


Solution

  • This can be achieved by extending ResultsListHandler class and override the process method. This method returns you ResultsList object and it has all the record returned by Endeca. It's alway good to index the properties and use record filter to filter instead of using code.

    Note: - This is not recommended way to filter record run time as pagination and other functionality would not work as expected.

    I hope this helps.

    Thanks, Ajay Agrawal