1 Reply Latest reply: Apr 13, 2012 2:12 PM by Gurvinder RSS

    Trying to make multiple facet/selections work

    930225
      I'm assigned a task of making ATG Commerce Reference Store use alternatives in faceted search filtering.
      What do I mean:
      Suppose I have facet "Color" with values "Red", "Green" and "Indigo". I'm located in some top-level category.
      And I filter search results by clicking on "Red" facet value in navigation panel. Search is requested with facetTrail string like: "9004:cat70002:1002:Red".
      But resulting FacetTrail object does not contain information about facet values "Green" and "Indigo".

      Documentation says:
      The search engine filters all facets unless the refinement configuration specifies otherwise. To disable
      filtering of an individual facet, you add the faceting property to the filterProperties array property of
      the /atg/commerce/search/refinement/RefinementConfigurationXMLGenerator component.
      By default, this property is set to:
      filterProperties=\ 
              ancestorCategories.$repositoryId,\ 
              ancestorCategories.displayName 
      If you have additional facets that you do not want to be filtered, add the faceting properties to this array.
      For example:
      filterProperties+=paperSizes
      I added all available in CRS filterProperties in RefinementConfigurationXMLGenerator object as instructed, like so:
      filterProperties+=price,childSKUs.size,childSKUs.color,childSKUs.woodFinish,features.displayName
      But, sadly, this had no effect.

      ----------------
      I'm checking for multiple facet values by running:
      <c:forEach var="currentFacetValue" items="${facetTrail.facetValues}">
          <dsp:getvalueof var="facetId" vartype="java.lang.String" value="${currentFacetValue.facet.id}" />
          <dsp:getvalueof var="facetValue" value="${currentFacetValue.value}" />
          <dsp:valueof value="${facetId}" />
          <c:forEach items="${facetValue}" var="currentMultiValue">
              <dsp:valueof value="${currentMultiValue}" />
          </c:forEach>
      </c:forEach>
      ,where I got $facetTrail object by running:
      <dsp:droplet name="CommerceFacetTrailDroplet">
          <dsp:param name="trail" bean="FacetSearchTools.facetTrail" />
          <dsp:param name="refineConfig" param="catRC" />
          <dsp:oparam name="output">
            <dsp:getvalueof var="facetTrail" param="facetTrail"/>
          </dsp:oparam>
      </dsp:droplet>
      ----------------
      There were some related questions, but they didn't help:
      Search 10.0.1 - Multi facet issue. - no answer given
      multiple facet selection, with OR combination - I re-did the indexing from BCC, but it did nothing back.

      ----------------
      So, how do I get required result? Have I misconfigured something? Or I simply searching results in the wrong place?

      Edited by: 927222 on Apr 13, 2012 5:48 AM
        • 1. Re: Trying to make multiple facet/selections work
          Gurvinder
          Ok..so if i get it right here

          your facet trail after selecting red color is coming as "9004:cat70002:1002:Red"
          which means that you are telling search engine to bring all search results that are in cat70002 and of color Red.
          Now why would refinements contain green and indigo.

          Coz when you are in top category your facet trail would be "9004:cat70002", which will say that bring me all results under category cat70002, and which will contain results of Red, Green and Indigo too if they are present.
          By clicking on a color you are basically narrowing your search.