The advanced version of the catalog search feature provides a more comprehensive search facility to your customers. It offers a customer more flexibility in expressing search terms and consequently more control over the results returned. It permits multiple input fields, which means that your customers can create more complex search terms and flexibility to control how these terms can processed by changing operator types (for example, <,>,=, like).
With more page real estate available to specify search expressions, explicit constraints will be offered to control the search. These constraints take the form of indicators to flag how the search constraint should be built from the expression. Boolean expression differs from the simple word search with three options:
- search any word for a broader search (default)
- search all words for a narrower search
- search exact phrase.
The definition for these search options are described in section on Boolean Search Support. Only those search attributes listed in the table in the section on Catalog Search Bean Command as having this feature will offer Boolean support. See section on Boolean Expression Support for the algorithm.
Additionally, your customers can search based on rich attributes, such as color or size. From the customer's perspective specifying search expressions for rich attribute is no different from those attributes from horizontal schema.
Search on a vertical schema is somewhat unique to the WebSphere Commerce schema, where attributes can be defined as values rather than columns in a table. These type of attributes are commonly referred to as rich attributes. Performing a search using these rich attributes requires creating more complex queries in the underlying search engine. These queries can have significant performance implications.
No Boolean support will be offered with search terms for these type of attributes. Operator types supported are the same same as those available for string or numeric as the case may be. Unless specified, default operator for this types is "equal", a precise match.
Rich attributes are not known until the database has been populated with data which happens after WebSphere Commerce Server has been installed. At this time, the catalog search bean must be customized to expose these attributes as valid search terms.
While both advanced search techniques are supported, Boolean expressions cannot be used to search rich attributes.
Due to the wide variety of search options, and the ability to specify multiple input fields, the advanced search interface is usually presented to customers as a separate page in the store. Often, the link to the advanced search page is located on the simple search results page, which invites customers to refine the results that they received, or to expand their search in cases where no results were returned.
For an example of one implementation method for the advanced catalog search, refer to the search pages which are part of the sample store.