Adding the new search profile
In this lesson, the search query is customized to search on the default predefined search fields, and on one or more of the new fields that are defined for warranty. This is achieved by extending the wc-search.xml file to include a custom search profile definition that extends an existing profile.
Once the mapping is configured, you add a search profile. The search profile is used to control the fields that are used in the search query. WebSphere Commerce provides predefined default search profiles. The common search profile uses the product name and short description fields in the search query. These search profiles have a hierarchical structure and can be extended. This tutorial demonstrates how to extend one of the predefined search profiles to include the fields from the warranty definition. From the user interface, the search profiles are used in the JSP files. Selecting the correct profiles are necessary to search on the correct search fields. It is demonstrated how the advanced search page can be modified to use the newly defined search profile.
IBM_findCatalogEntryByNameAndShortDescription
profile so that you can search on more fields. This extension is completed by creating a custom
profile in the wc-search.xml file. For more information on other profiles in
the wc-search.xml file that you can extend and the effects of changing these
profiles, see WebSphere Commerce search configuration file (wc-search.xml) (WC EAR). If
you are looking to modify an existing property within a existing WebSphere Commerce profile, a
custom profile is not required. For more information about making changes to these WebSphere
Commerce profiles, see Changing properties in the search configuration file (wc-search.xml) (WC EAR). Procedure
-
Review the wc-search.xml file to view the profile you will be extending in
this tutorial.
-
Add a custom search profile.