[TYPO3-Solr] Build A-Z Search

Ingo Renner ingo at typo3.org
Tue Jul 31 12:39:40 CEST 2012


Am 30.07.12 12:01, schrieb Schwarzenberg:

Hi Heiko,

> i would like to build an A-Z Search to search for Documents whose title
> starts with the correspondent letter. So now I'am unsure wheter to use a
> special Facet or to create a new Field Type for the initial letter (is
> it possible with a dynamic field?).

> What would be the best way to achieve this kind of search?

I would suggest to index a dynamic field of type string with the first 
letter of the title and then build a facet on it

titleFirstLetter_stringS = TEXT
titleFirstLetter_stringS {
	field = title
	... use stdWrap substring to get the first letter
}

facets {
	firstLetter {
		field = titleFirstLetter_stringS
		label = A-Z
	}
}


HTH
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