You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Robert Brown <ro...@intelcompute.com> on 2011/12/01 17:30:47 UTC

switching on hl.requireFieldMatch reducing highlighted fields returned

I have a query which is highlighting 3 snippets in 1 field, and 1 
snippet in another field.

By enabling hl.requireFieldMatch, only the latter highlighted field is 
returned.

from this...

<lst name="highlighting">
<lst name="348231">
<arr name="content_stemmed">
<str>
plc Whetstone Temporary [hl-on]Sales[hl-off] Assistant Customer 
service Cashier work 08
</str>
<str>
and customer queries. 07 / 99 – 2003 Debenhams Central London 
[hl-on]Sales[hl-off] Adviser Customer
</str>
<str>
Central London [hl-on]Sales[hl-off] Assistant Customer service; Visual 
merchandising; Dealing
</str>
<str>
with telephone enquiries; Assisted in the [hl-on]production[hl-off] of 
jewellery, e.g. setting stones
</str>
</arr>
<arr name="skills_stemmed">
<str>
[hl-on]product[hl-off] knowledge [hl-on]sales[hl-off] experience
</str>
</arr>
</lst>
</lst>


to this...

<lst name="highlighting">
<lst name="348231">
<arr name="skills_stemmed">
<str>product knowledge [hl-on]sales[hl-off] experience</str>
</arr>
</lst>
</lst>


I'm doing this so the word "product" and it's variants are NOT 
highlighted - they match against a different field.