on 2016 May 03 1:19 PM
I am working on a project where I need to apply dynamic filter in the implementation of FacetSearchListener, before Solr query is executed, based on the request. How will I be able to distinguish the request in the listener class so that if else condition can be applied.
if you don't own the code which creates SolrSearchRequest/SearchQuery, etc and you dont want to override the existing services like de.hybris.platform.commerceservices.search.solrfacetsearch.impl.DefaultSolrProductSearchService then simplest way will be to call seach API inside SessionService.executeInLocalView method and pass your parameter(s) to a custom FacetSearchListener as part of session context. Then your FacetSearchListener can obtain sessionService.getAttribute() and do related logic.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
11 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
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.