[TYPO3-Solr] Highlighting in other fields

Jigal van Hemert jigal.van.hemert at typo3.org
Thu May 30 12:23:55 CEST 2013


Hi,

For a project we need highlighting to work in several fields.
I found and applied the patch in [1].

This should extend the highlighting capabilities to other fields than 
'content'. It didn't work on other fields, so I started investigating 
some search queries directly in the URL on the solr server.

hl=true
hl.fl=title,content,apply_procedure_stringS,fullName_stringS,team_stringS,taken_stringS

The following settings are set by default in solrconfig.xml:
hl.snippets=3
hl.mergeContiguous=true
hl.requireFieldMatch=true

According to [2] this causes the highlighter to only highlight fields 
that also match in the query. Neither setting this to false nor adding 
the field (taken_stringS) to the query fields (qf) makes a difference. 
Highlighting is only active in the title and content fields in the 
output of the solr server.

I am aware of the fact that EXT:solr doesn't allow me to change 
hl.requireFieldMatch (yet), but at the moment it doesn't seem to work at 
the solr server side.

Any ideas how to make solr highlight other fields?

[1] http://forge.typo3.org/issues/45201
[2] http://wiki.apache.org/solr/HighlightingParameters#hl.requireFieldMatch

-- 
Jigal van Hemert
TYPO3 CMS Active Contributor

TYPO3 .... inspiring people to share!
Get involved: typo3.org


More information about the TYPO3-project-solr mailing list