[TYPO3-Solr] search a dynamic field

Ingo Renner ingo at typo3.org
Mon Sep 10 10:28:35 CEST 2012


Am 05.09.12 10:08, schrieb Stefano Cecere:

Hi Stefano,

>   search {
>      query {
>        fields = title^20.0, content^10.0, keywords^2.0, tagsH1^5.0,
> tagsH2H3^3.0, tagsH4H5H6^2.0, tagsInline^1.0, town^1.0, town_stringS^1.0

this is what you need to have the field searched.

However, you added the field as a string type field. Strings require 
exact matches, not sure if that is what you want. You might be better 
off with a text type field. text fields do some processing on the 
content like tokenization and stemming. You probably don't want stemming 
on a town's name so I'd suggest to use a whitespace tokenized text field 
- town_textWstS

Let us know if that helps.


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