[TYPO3-Solr] Keywords as facets

Ingo Renner ingo at typo3.org
Mon Jul 23 16:00:31 CEST 2012


Am 23.07.12 10:27, schrieb Schwarzenberg:

Hi Heiko,

> Now i try to use these keywords a facets, so i configured the faceting
> with TypoScript the following way:
>
> plugin.tx_solr.search.faceting {
>          keywords{
>              field = keywords
>              label = Tags
>          }
> }
>
> But now, the keywords are split in sub-words like that:

The problem here is, that the keywords field is defined as type text 
(you can look this up in 
EXT:solr/resources/solr/typo3cores/conf/general_schema_fields.xml). The 
text type does things like tokenization and stemming - as you can see - 
which is not really suited for faceting. Instead you want to use a (in 
this case) multivalued string field:

plugin.tx_solr.index.queue.pages.fields {

	keywords_stringM = SOLR_MULTIVALUE
	keywords_stringM.field = keywords

}

plugin.tx_solr.search.faceting.facets {

	keywords {
		field = keywords_stringM
		label = Tag
	}

}


best
Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2, Admin Google Summer of Code

TYPO3 - Open Source Enterprise Content Management System
http://typo3.org

Apache Solr for TYPO3 -
Open Source Enterprise Search meets Open Source Enterprise CMS
http://www.typo3-solr.com


More information about the TYPO3-project-solr mailing list