on 2019 Sep 12 5:58 PM
Hi Experts
I have a query
if the Customer Part # is 48-32-4024, then the user will be search both ways "48-32-4024" or as "48324024"
then the user should get the product .
Request clarification before answering.
Hi mahendher
There can be two way of parsing value of part#
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
In previous hybris version before 5.7 we had DefaultFacetSearchService using SolrQueryConverter to hold reference of all defined query post-processors hooks.
Search Query Post-Processors and Search Result Post-Processors- These were query post-processors that operate on the Solr query object and the search result object returned from the Solr index search respectively. But Post-Porcessors got deprecated and only works when the legacy mode is enabled in the search configuration.
Post version 5.7 Hybris provides a list of the listener types and you can use FacetSearchListener interface as you want to intercept execution of search queries.
You can write a class say DefaultFacetSearchListener which must implement FacetSearchListener interface and override its methods and can get what you need from FacetSearchContext parameter.
public class DefaultFacetSearchListener implements FacetSearchListener
{
@Override
public void afterSearch(final FacetSearchContext facetSearchContext) throws FacetSearchException
{
final SearchResult searchResult = facetSearchContext.getSearchResult();
final QueryResponse solrObject = searchResult.getSolrObject();
final NamedList<Object> response = solrObject.getResponse();
final NamedList responseList = (NamedList) response.get("responseHeader");
final NamedList paramsList = (NamedList) responseList.get("params");
....
....
....
}
}
Regards,
Prashant
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 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.