[TYPO3-Solr] Facet for sys_category not working

Birte Weishaupt birte.weishaupt at uni-bremen.de
Thu Sep 24 14:46:44 CEST 2015


Hi,

 

I'm trying to get sys_categories to work with solr on page level. I've been
using the tutorial provided by Steffen Ritter
(http://blog.steffen-ritter.net/2014/04/extsolr-use-categories-as-hierarchic
al-facets/) and indexing seems to work fine, but the categories don't get
rendered as facets in the frontend. I'm using typo3 6.2.15 and solr
3.1.0-dev.

 

Any help on what I'm doing wrong would be highly appreciated!

 

Example of an indexing result for field category_stringM:

0             0-6

1             1-6/7

2             0-1

3             1-1/4

4             2-1/4/12

5             0-13

6             1-13/14

 

plugin.tx_solr {

  index {

    fieldProcessingInstructions {

        category_stringM = categoryUidToHierarchy

    }

    queue {

        pages {

          fields {                

                category_stringM = SOLR_RELATION

                category_stringM {

                        localField = categories

                        foreignLabelField = uid

                        multiValue = 1

                }

          }

        }

    }

  }

}

 

plugin.tx_solr {

  search {

    faceting {

        facets {          

          category_stringM {

            label = Category

            field = category_stringM

            type = hierarchy

            hierarchy = HMENU

            1 = TMENU

            1 {

                NO = 1

                NO {

                  wrapItemAndSub = <li>+&nbsp;|</li>

                  stdWrap.cObject = RECORDS

                  stdWrap.cObject {

                        source.field = facetKey

                        tables = sys_category

                        dontCheckPid = 1

                        conf.sys_category = TEXT

                        conf.sys_category.field = title

                        conf.sys_category.htmlSpecialChars = 1

                  }

                  stdWrap.dataWrap = |&nbsp;<span
class="facetoption-result-count">({field:numberOfResults})</span>

                }

                CUR = 1

                CUR < .NO

                CUR.wrapItemAndSub = <li class="current">|</li>

 

                ACT = 1

                ACT < .NO

                ACT.wrapItemAndSub = <li class="active">|</li>

            }

            2 < .1

            2.wrap = <ul>|</ul>

 

            3 < .2            

          }

        }

    }

  }

}

 

Kind regards, 

Birte

 



More information about the TYPO3-project-solr mailing list