[ https://issues.apache.org/jira/browse/SOLR-8583?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15298350#comment-15298350 ]
David Smiley commented on SOLR-8583: ------------------------------------ Hi [~janhoy], thanks for requesting my input. Overall this looks good. I do wonder if we want to introduce new options to the most overly configurable component there is when we could change the existing behavior, and perhaps nobody would notice. In particular only if hl.requireFieldMatch=true (which is normally false) would this make sense, and then we could just simply do it without some new option. 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. 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. bq. Why cannot all highlighters use the same hl.tag.pre/post params? I feel your pain! And now we are stuck with it forever (sarcasm). Expect to see a new highlighter announced this year, and with it I will propose a bit of unification on the Solr side. > 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