[ 
https://issues.apache.org/jira/browse/SOLR-8583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15299739#comment-15299739
 ] 

Jan Høydahl commented on SOLR-8583:
-----------------------------------

bq.  I do wonder if we want to introduce new options [...]
Agree. Think I'll keep the param but make it default to true, so people can 
turn it off to get old behavior

bq. I think swapping in and out the SolrParams on the request is fine, albeit 
unfortunate. Maybe do in try-finally. And maybe instead of loading up a new 
ModifiableSolrParams with all of the existing ones, this could be done with 
SolrParams.wrapDefault? Or just leave it; it works.
Found a way to avoid swapping. Instead the {{doHighlightingByXXX()}} methods 
take a new argument {{invariantParams}} which is then combined with 
{{wrapDefault}}. it works well and is less hacky.

bq. Instead of schema.getFieldOrNull for the alternate field, I think it should 
just call getField since it should be erroneous to refer to a non-existent 
field.
This caused test failure in existing tests. So I'm keeping old behavior that if 
fallbackField does not exist, nothing is output at all.

bq. Expect to see a new highlighter announced this year, and with it I will 
propose a bit of unification on the Solr side.
Looking forward to that!


> Apply highlighting to hl.alternateField
> ---------------------------------------
>
>                 Key: SOLR-8583
>                 URL: https://issues.apache.org/jira/browse/SOLR-8583
>             Project: Solr
>          Issue Type: Improvement
>          Components: highlighter
>    Affects Versions: 5.4
>            Reporter: Jan Høydahl
>            Assignee: Jan Høydahl
>             Fix For: 6.1
>
>         Attachments: SOLR-8583.patch
>
>
> Today, you can configure hl.alternateField for highlighter to display if no 
> snippets were produced from original field. But the contents of the fallback 
> field is output without highlighting the original query terms.
> This issue will introduce a new param {{hl.highlightAlternate=true}}, which 
> will then cause alternate field to be highlighted with no snippet generation, 
> and still respect max length.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org

Reply via email to