Uploaded image for project: 'Skin Intranet Search'
  1. Skin Intranet Search
  2. SKINSEARCH-134

Research service : The display order of the labels facet is not correct

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 1.4.0
    • 1.4.0
    • None
    • None
    • 4.7.0 RC1

      The tags labels are not ordered, it is not the alphabetical order, not the other of the number of result

        1. tags.png
          15 kB
          Laurence Perier

          [SKINSEARCH-134] Research service : The display order of the labels facet is not correct

          By default the facet elements are sorted on alphabetical order. For tags, it did not work because of CMS-10799 nut now it is ok.

          To order by count, you need to override "facet-filter-elements" XSL template

          <xsl:template name="facet-filter-elements">
                  <xsl:for-each select="item[@count > 0]">
                      <xsl:sort select="text()"/>
                      
                      <xsl:call-template name="facet-filter-element"/>
                  </xsl:for-each>
              </xsl:template> 

          Laurence Aumeunier added a comment - By default the facet elements are sorted on alphabetical order. For tags, it did not work because of CMS-10799 nut now it is ok. To order by count, you need to override "facet-filter-elements" XSL template <xsl:template name= "facet-filter-elements" >         <xsl: for -each select= "item[@count > 0]" >             <xsl:sort select= "text()" />                          <xsl:call-template name= "facet-filter-element" />         </xsl: for -each>     </xsl:template>

            laurence Laurence Aumeunier
            lperier Laurence Perier
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: