[TYPO3-Solr] Facet for sys_category not working

Birte Weishaupt birte.weishaupt at uni-bremen.de
Thu Sep 24 15:07:30 CEST 2015


Hi,

you are right! Everything works perfectly now - thank you so much!


-----Ursprüngliche Nachricht-----
Von: typo3-project-solr-bounces at lists.typo3.org
[mailto:typo3-project-solr-bounces at lists.typo3.org] Im Auftrag von Sebastian
Schreiber
Gesendet: Donnerstag, 24. September 2015 14:49
An: typo3-project-solr at lists.typo3.org
Betreff: Re: [TYPO3-Solr] Facet for sys_category not working

Hi Birte,
as far as i can see at the first glimpse, that you have forgotten to
encapsulate the TMENU in hierarchy (HMENU).
So you have to write

hierarchy {
	1 = TMENU
}


Am 24.09.2015 um 14:46 schrieb Birte Weishaupt:
> 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-hier
> archic
> 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
> 
>  
> 
> _______________________________________________
> TYPO3-project-solr mailing list
> TYPO3-project-solr at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr
> 


--
Sebastian Schreiber
(Medieninformatiker B.Sc.)
(TYPO3 Certified Integrator)

Paul Nießen Straße 58
D-50969 Köln

T  0221 677 88 541
M  0176 431 05 790

Skype schreibersebastian.de

me at schreibersebastian.de
www.schreibersebastian.de

Steuernummer: 219 / 5302 / 3123
_______________________________________________
TYPO3-project-solr mailing list
TYPO3-project-solr at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-solr



More information about the TYPO3-project-solr mailing list