cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

How to implement recent search in Hybris 1808

former_member704915
Participant
0 Likes
848

Hello! We have a requirement to implement "recent search" for search box. As soon as a user clicks on the search box, a drop down should appear showing the recently searched products by the user. Is there any OOTB support for this? If not, any suggestions how to implement this?

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Likes

Hi Abhijit ,

I am unsure of OOTB Solutions ,

But I would store a attribute in session using java.util.Stack Data type ,

Each and every search add the Search String into the stack ,

You can have a AJAX call to pick the top few from session attribute ,

Hope this helps ,

Arun

Former Member
0 Likes

You can enable SOLR Statistics collection: https://help.hybris.com/1811/hcd/8b45d6de86691014ba4fc33767ce42e2.html

Once you have it enabled. You could query the DB on every search to query the first 3 queries from that table.

former_member704915
Participant
0 Likes

This doesn't help.