Simple catalog search

The basic Catalog Search allows the customer to navigate the catalog quickly to find items of interest. Customers enter one input criteria as the complete search expression. By specifying one or more words into a single expression, items from the catalog that match those words are returned in the search results. Boolean support returns results that contain any one word from the expression. This type of search is typical of those offered as one part of a panel on any Web page.

Once implemented, the basic version of the catalog search feature adds a text entry field to the page and a button that launches the search. Text strings that are entered into this field are compared against the database to find matches. Search results are then displayed in the results page. If the search string is multiple words separated by spaces, the search engine treats each space as a logical 'and' operator.

The basic Catalog Search interface requires minimal Web page real estate. To provide this convenient feature to your customers, consider including a simple Catalog Search data bean on most of your store pages.

For an example of an implementation of the simple catalog search, refer to the CachedHeaderDisplay.jsp file in the Consumer Direct and B2B Direct starter stores.

Note: During development, it is useful to enable tracing on the component WC_SEARCH. By looking at the trace log, you can see the generated SQL.