com.ibm.commerce.foundation.internal.server.services.search.expression.solr

Class SolrSearchExpressionProvider

  • All Implemented Interfaces:
    SearchExpressionProvider


    public class SolrSearchExpressionProvider
    extends AbstractSolrSearchExpressionProvider
    implements SearchExpressionProvider

    This is a Solr specific implementation of the search expression provider. This provider helps converting an XPath expression into a Solr specific expression by calling each of the expression providers configured for the given search profile.

    This provider performs the following high level steps in this given order:

    1. Validates a search profile is given by calling SolrSearchProfileNameValidator and stops immediately if none is provided;
    2. Validates the corresponding index name by calling SolrSearchIndexNameValidator and stops immediately if invalid;
    3. Validates the corresponding workspace information by calling SolrSearchWorkSpaceValidator and set the information to let the processor know;
    4. Decodes _wcf.search.meta if provided and expands into _wcf.search.internal.meta by calling SolrSearchDecodeMetaTokenExpressionProvider; the value in this control parameter can be treated as the bread crumb trail;
    5. Calls each of the given expression providers defined in the search profile;
    6. Validates the search expression to ensure the query expression is not empty and does not contain special characters by calling SolrSearchExpressionValidator.
    7. Reconstructs and encodes the new meta string in _wcf.search.meta by calling SolrSearchEncodeMetaTokenExpressionProvider so that it can be reused later to represent the current navigation state.