lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Høydahl (JIRA) <>
Subject [jira] [Commented] (SOLR-2730) Highlighting is not HTML-encoded when fallback to alternate field
Date Thu, 25 Aug 2011 12:09:29 GMT


Jan Høydahl commented on SOLR-2730:

Suggested fixes:
A) Always return the fallback field content HTML-encoded, as is done for normal highlighted
B) Include a flag in the highlighting result which says whether fallback has occurred, so
client can do something intelligent

> Highlighting is not HTML-encoded when fallback to alternate field
> -----------------------------------------------------------------
>                 Key: SOLR-2730
>                 URL:
>             Project: Solr
>          Issue Type: Bug
>          Components: highlighter
>            Reporter: Jan Høydahl
> When highlighter finds matches in the field and returns the snippets, all other text
returned is HTML-encoded, i.e. a <br> in the field will be displayed as a literal tag
instead of causing a break.
> But when hl.alternateField is used, and the query does not match any words in the field,
the alternate fallback field is returned as is, without being HTML-encoded.
> This is inconsistent and causes problems in the client. HTML-encoding in the client is
not an option since the highlighted snippets then would break.

This message is automatically generated by JIRA.
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message