Customize the search run time
We can customize several areas of the search run time.
- Creating a custom expression provider
An expression provider implements custom business logic for modifying the main search expression before it is sent to the search engine. Each expression provider can be separately registered to any search profile query section so that it can be reused for other search operations. That is, a search profile defines a list of search providers used for assembling the main expression for a search request.- Adding native Solr query parameters to search expressions
We can add native Solr query parameters to each search profile's query parameter section to enhance and customize the final Solr query.- Disable default search expression providers
We can disable certain expression providers and result filters in the WebSphere Commerce search configuration file (wc-search.xml). Doing so optimizes the storefront flow and improves the overall response time for certain types of WebSphere Commerce Search scenarios.- Creating a custom query preprocessor
A query preprocessor modifies the native SolrQuery object right before it is sent to the Solr server for processing.- Creating a custom query postprocessor
A query postprocessor modifies the physical DataObject, SolrEntityContainerImpl, immediately after the QueryResponse is returned from the Solr server.