lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Smiley (JIRA)" <>
Subject [jira] [Commented] (SOLR-8583) Apply highlighting to hl.alternateField
Date Thu, 26 May 2016 06:39:13 GMT


David Smiley commented on SOLR-8583:

Shouldn't this new logic be integrated with alternateField()'s logic?  It's confusing that
it's separate, and makes this long method longer with a bit of dejavu logic.  Perhaps this
is confounded by the awkwardness induced by the lazy init of re-using fvh & fvhFieldQuery?
  Hmmm; maybe we should populate that eagerly if we detect FVH?  That ought to allow to move
the code to not repeat our logic... maybe by extracting a method on the majority of the content
of the field highlighting loop so we can invoke it for alternate field highlighting.  But
again that's currently blocked by the lazy init.

RE passing SolrParams to the doHighlighting* methods, I think the caller should use SolrParams.wrapDefaults
instead of making the callee do this.  In this way, the parameter is simply "params" without
any reference to "invariant" terminology/semantics.  BTW I was fine with you calling req.setParams
as you had it before -- less gotchas.  As it is, doHighlightingByHighlighter calls methods
like getHighlighter and getPhraseHighlighter that don't have this overridden params.  It might
not matter but it's problematic in principle at least.

> Apply highlighting to hl.alternateField
> ---------------------------------------
>                 Key: SOLR-8583
>                 URL:
>             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, 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 cause alternate field to be highlighted with no snippet generation, and
still respect max length. You can turn it off using new param {{hl.highlightAlternate=false}}.
Supported highlighters: Simple, FVH

This message was sent by Atlassian JIRA

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

View raw message