[TYPO3-Solr] Hierarchical facets- practical advice needed

Hauke Meyer meyer at visionconnect.de
Tue Jun 19 17:44:21 CEST 2012


Hi there,

I try to implement a hierarchical facet in our solr search (typo3
extension 2.2). I use the following steps:

1. I add a special field to the index queue:

pages{
	fields{
	hiera_stringS = SOLR_CONTENT
	hiera_stringS  {
	value = {leveltitle:1}/{leveltitle:2}/{leveltitle:3}/
		insertData = 1				
	}
	}
}

2. I add a new type in general_schema_types.xml:

<fieldType name="text_path" class="solr.TextField"
positionIncrementGap="100">
   <analyzer>
	<tokenizer class="solr.PathHierarchyTokenizerFactory" delimiter="/" />
   </analyzer>
</fieldType>

3. I add a new field in general_schema_types.xml:

 <field name="hiera_stringS" type="text_path" indexed="true"
stored="true" />

As the result I got a nicely filled hiera_stringS field in my indexed
data and when I configure my facet right I get the expected hierarchical
facets:

hiera_stringS = "/usr/local/apache"
	
facets:

/usr
/usr/local
/usr/local/apache
	

But this is, of course, not what I want. I need an advice how to
configure the renderingInstruction part of the faceting.facets.[myfac].

Any help will be nice! May be my way to get the facets is old fashioned
and there is a better way?


Cheers

Hauke





More information about the TYPO3-project-solr mailing list