WebSphere Commerce Search extension points and customization tasks
WebSphere Commerce Search contains extension points that can be used for customization. There are mandatory and optional areas to work with, depending on the customization to the WebSphere Commerce Search implementation.Most customization flows involve indexing new data from either the database or a file, searching against the new indexed fields, displaying the indexed data in the storefront, and creating business rules using the indexed data field. Other advanced search customization areas require some runtime customization where a custom search expression provider, search result filter, or other runtime search extension points might require customization.
These extension points are shown in blue in the following flow diagram.
Where the WebSphere Commerce Search run time is used on the search server. Instead of using BOD and performing object based-mediation, the search REST programming model does not rely on any SDO. It uses POJO and raw data that is returned from the search server to perform simple name-value pair mapping.
Indexing (including preprocessing) is performed and launched from the WebSphere Commerce server. After index preprocessing successfully completes, the Data Import Handler (DIH) can be run from the same WebSphere Commerce server. Solr can start creating and updating the Lucene index from the WebSphere Commerce temporary database tables. If preprocessing is not required, such as for the inventory extension index, the DIH process can be started either from WebSphere Commerce or directly from a URL issued against the WebSphere Commerce Search server.
Customizing the index life cycle
Most indexing features can be controlled using the three main configuration files, schema.xml, solrconfig.xml, and wc-data-config.xml. Some healthcheck customization is also allowed. The following table shows which kinds of index lifecycle customization are supported in WebSphere Commerce Search.
Method Customization point Level of support* Customize default index schema.xml file Add customized field reusing WebSphere Commerce fieldType into default index schema (Including preprocess or buildindex) Supported. See Search index schema customization file x-schema.xml. Add customized fieldType Supported. Search index schema customization file x-schema.xml. Modify fields with Solr native fieldType in schema.xml (such as int,string,date, float, long etc). Not supported Modify a WebSphere Commerce fieldType in x-schema.xml (Such as wc_text*, add StopWords to partNumber_ntk). Supported. Search index schema customization file x-schema.xml Modify a WebSphere Commerce fieldType in x-schema.xml for specified language (for example,to customize StopWords for english only). Supported. Search index schema customization file x-schema.xml Add new language core for existing OOB index Customize native Solr using solrconfig.xml Revert to previous versions' MultipleQueryComponent for customized extension core
- Return filed from extended index. For example, return price information and inventory information. Return customized information from customized extended index as well.
- Filter by extended index field. For example, only display products that have non-zero inventory.
- Sort by extended index filed. For example, sort by price.
- Facet by extended index. For example, display price facet from 0 to 100.
- Boost by extended index. For example, boost products that have inventory larger than 100.
- Customize a Solr function to do sorting.
Supported. See Enable MultipleQueryComponent and MultipleFacetComponent in Version 9. Register a customized query parser Supported. See Customizable components of the final Solr query. Register a function parser Supported. See Enable search on additional unstructured content types Register a transform during buildindex Supported. See The indexing process Customize IndexSearcher related event listener Not supported Customize update related event listener Not supported Customization on wc-data-config.xml Customization of existing field mappings in wc-data-config.xml for CatalogEntry/CatalogGroup/unstructured/Inventory/Price Not supported Add a new field mapping in wc-data-config.xml for CatalogEntry, CatalogGroup, Unstructured, Inventory, or Price Supported. See Extending the wc-data-config.xml file using the wc-data-preprocess-x-finalbuild.xml file. Choose non-ATP or DOM inventory for wc-data-config.xml Supported. See Search properties in the component configuration file (wc-component.xml). Completely override the default wc-data-config.xml Supported. See Extending the wc-data-config.xml file using the wc-data-preprocess-x-finalbuild.xml file. Replication, operation and healthcheck Perform replication on a customized index, for example replicate from a master to a repeater, or from a repeater to a subordinate Not supported Replicate on an external file for a customized index Not supported Customize existing replication, operation, or healthcheck functions Supported. See Index verification extension points Cache and cache invalidation Cache invalidation by CACHEIVL table for a customized index Replace with other centralized cache provider (such as WXS) Not supported Customize indexload Indexload for master CatalogEntry or CatalogGroup Not supported Indexload for customized extension core Not supported Customization to Sharding Sharding on a core other than catentry Not supported Create or build a new core or subcore
Create a customer master or extension core Supported Build a custom index or delta
- Preprocess or build an index for a customized core using IndexingService
- Delta build on customized core using indexingService
- Preview trigger buildindex
- Scheduler buildindex on customized core
- Preview on approved customized index
- Preview on un-approved customized index
- Dataload trigger buildindex for customized index
Future support * IBM provides three levels of support.
- Supported: The customization process is supported. See Contacting IBM Software Support.
- Future support: IBM intends to support the customization feature in a future release. If you have a related customization need, we can contact the IBM support team for more information.
- Not supported: IBM is not planning to support such a customization feature in the future. You should avoid customizing the related area or look for alternatives in your implementation.
Customizing for runtime
The search runtime, REST services, and search components are all customizable. The following table lists supported runtime customizations.
Runtime feature Customization point Level of support Create or customize a REST service REST
- Register a new customized search profile in wc-rest-resourceconfig.xml. See
Mapping between WebSphere Commerce Search profiles.- Change security configuration in wc-rest-security.xml. For information on changing this file, see Enable partial authentication and cookie-based authentication for REST services.
- Change REST cache configuration in wc-rest-clientCaching.xml. See Caching strategies for REST services.
- Change REST format in wc-rest-responseformat.xml. See Customizing REST services to support new custom response formats.
Supported Customize the Search runtime Create or customize the Search profile Supported. See Customizing search profiles. Customize an expression provider Supported. See Creating a custom expression provider. Customize the preprocessor Supported. See Creating a custom query preprocessor. Customize postprocessor Supported. Creating a custom query postprocessor Customization by search component Customize a search rule Not supported Customize merchandising association Not supported Customize sequencing Supported. See Sorting products using deep search sequencing. Customize a result group Supported. See WebSphere Commerce Search configuration file (wc-search.xml). Customize price (index offer price, index contract price) Supported. See Displaying price ranges in the storefront. Customize inventory (return inventory, filter by inventory, boost inventory) Supported. See Search relevancy and merchandising Customize how the CrumbTrail is displayed Supported. See ../../com.ibm.commerce.api.doc/com/ibm/commerce/foundation/server/services/rest/search/postprocessor/solr/SolrRESTSearchBreadCrumbTrailQueryPostprocessor.html Customize how attachments are displayed Supported. See Manage attachments Customize search capability
- Facet
- Sort
- Highlight
- Pagination
- Spell checking
- Suggestion (keyword, product, category)
- Search Term Association
- Search statistics
- Landing page
- Crawler
Supported. See Search relevancy and merchandising. Customization for B2B entitlement Supported. See Use catalog filters. Customize facets (including price, brand and attribute facet) Supported. See Enable custom facet value sequencing. Customize search type Supported. See Changing the default search type Customize web content Supported Customize preview Supported. See Search properties in the component configuration file (wc-component.xml). Customize expansion or relevancy Supported. Combining minimum match and search term associations Customization on spell checking Supported. See Manage spell correction Read additional customized field from default index or customized index Supported. See Extending the schema.xml file using the x-schema.xml file Miscellaneous Add support for RunAsUser Create or build a new core or subcore
Create a customer master or extension core Supported Build a custom index or delta
- Preprocess or build an index for a customized core using IndexingService
- Delta build on customized core using indexingService
- Preview trigger buildindex
- Scheduler buildindex on customized core
- Preview on approved customized index
- Preview on un-approved customized index
- Dataload trigger buildindex for customized index
Future support
- Search index schema customization file x-schema.xml
Adding new fields into the index schema requires modifying the x-schema.xml file to add the new index field. Typically, an existing index is updated to add new fields (local index). In other instances, IBM recommends to extend the product index by creating an index as an extension of an existing index (extension index).- Extending the WebSphere Commerce Search base index schema
The base index schema can be extended to suit your business needs. For example, to separate data into different indexes that are based on their refresh intervals.