com.ibm.commerce.catalog.facade.server.services.search.suggestion.solr

Class CategoryNavigationSuggestion

  • All Implemented Interfaces:
    NavigationSuggestion


    public class CategoryNavigationSuggestion
    extends AbstractNavigationSuggestion
    implements NavigationSuggestion

    This class implements the NavigationSuggestion interface to provide navigation suggestions for 'Categories' of the catalog entries from the catalog group search index. It will return all of the Categories scoped to the current catalog and store.

    Below is an XML snippet of the information the webservice will return for this navigation suggestion handler. The information returned is:

    • SuggestionView -> Identifier:

      This is the identifier for this suggestion. It will return 'Category'. This is helpful for the store developer in that they can look for this identifier and perform formatting in the storefront.

    • SuggestionView -> Label:

      This is a language sensitive display name for this suggestion. It will return 'Category' for english, 'Cat�gorie' for french etc.

    • SuggestionView -> Entry -> Name:

      This is a display name for this suggestion entry for category. It will return a possible value for Category. (ie. Tools)

    • SuggestionView -> Entry -> Value:

      This is the value for use with link building in the store. It will return the category ID of the category.

    • SuggestionView -> Entry -> Image:

      This is a display image for this suggestion entry for category. The thumbnail image will be returned.

    • SuggestionView -> Entry -> UserData -> UserDataField (FULL_PATH):

      This is the full hierarchy path for the category, in the form of display names (language sensitive). The categories are separated by the character ';' (semi-colon).

    • SuggestionView -> Entry -> UserData -> UserDataField (CATEGORY_SEPARATOR):

      This is for use with the full hierarchy path for the category, this the separator between category names and can be used for parsing. The default value is ' > ', which is ' > '. This value is configurable in the wc-search.xml file for this navigation suggestion handler by setting the param value for the parameter with name 'categorySeparator'. <_config:profile indexName="CatalogEntry" name="IBM_findNavigationSuggestions"> .. <_config:navigationSuggestion> <_config:suggestion name="Category" handler="com.ibm.commerce.catalog.facade.server.services.search.suggestion.solr.CategoryNavigationSuggestion"> <_config:param name="categorySeparator" value=" -> "/>

    
       <_cat:CatalogNavigationView>
         <_cat:BreadCrumbTrailView/>
        <_wcf:UserData/>
    	  <_cat:SuggestionView>
           <_cat:Identifier>Category</_cat:Identifier>
           <_cat:Label>Category</_cat:Label>
            <_cat:Entry>
              <_cat:Name>Apparel</_cat:Name>
              <_cat:Value>10129</_cat:Value>
              <_cat:Image>images/catalog/apparel/Kids_clothing_sm.jpg</_cat:Image>
              <_cat:UserData>
                <_wcf:UserDataField name="FULL_PATH">Apparel</_wcf:UserDataField>
                <_wcf:UserDataField name="CATEGORY_SEPARATOR"> &gt; </_wcf:UserDataField>
              </_cat:UserData>
            </_cat:Entry>
            <_cat:Entry>
              <_cat:Name>Sleepers and Pyjamas</_cat:Name>
              <_cat:Value>10130</_cat:Value>
              <_cat:Image>images/catalog/apparel/Sleepwear_sm.jpg</_cat:Image>
              <_cat:UserData>
                <_wcf:UserDataField name="FULL_PATH">Apparel &gt; Sleepers and Pyjamas</_wcf:UserDataField>
                <_wcf:UserDataField name="CATEGORY_SEPARATOR"> &gt; </_wcf:UserDataField>
              </_cat:UserData>
            </_cat:Entry>
            <_cat:Entry>
              <_cat:Name>Tops</_cat:Name>
              <_cat:Value>10131</_cat:Value>
              <_cat:Image>images/catalog/apparel/girls_boys_tops_sm.jpg</_cat:Image>
              <_cat:UserData>
                <_wcf:UserDataField name="FULL_PATH">Apparel &gt; Tops</_wcf:UserDataField>
                <_wcf:UserDataField name="CATEGORY_SEPARATOR"> &gt; </_wcf:UserDataField>
              </_cat:UserData>
            </_cat:Entry>
            <_cat:Entry>
              <_cat:Name>Bottoms</_cat:Name>
              <_cat:Value>10132</_cat:Value>
              <_cat:Image>images/catalog/apparel/girls_boys_bottoms_sm.jpg</_cat:Image>
              <_cat:UserData>
                <_wcf:UserDataField name="FULL_PATH">Apparel &gt; Bottoms</_wcf:UserDataField>
                <_wcf:UserDataField name="CATEGORY_SEPARATOR"> &gt; </_wcf:UserDataField>
              </_cat:UserData>
            </_cat:Entry>
            <_cat:Entry>
              <_cat:Name>Girls Dresses and Skirts</_cat:Name>
              <_cat:Value>10133</_cat:Value>
              <_cat:Image>images/catalog/apparel/dresses_skirts_sm.jpg</_cat:Image>
              <_cat:UserData>
                <_wcf:UserDataField name="FULL_PATH">Apparel &gt; Girls Dresses and Skirts</_wcf:UserDataField>
                <_wcf:UserDataField name="CATEGORY_SEPARATOR"> &gt; </_wcf:UserDataField>
              </_cat:UserData>
            </_cat:Entry>
          </_cat:SuggestionView>
      </_cat:CatalogNavigationView>
     
    See Also:
    NavigationSuggestion, AbstractNavigationSuggestion, SearchNavigationSuggestionsResultFilter
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String COPYRIGHT
      IBM Copyright notice field.