on ‎2019 Mar 29 7:47 AM
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?
Request clarification before answering.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 4 | |
| 2 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.