lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <>
Subject [jira] [Commented] (LUCENE-4856) If no Passages are found for a doc, PostingsHighlighter should return first n sentences?
Date Wed, 20 Mar 2013 12:09:15 GMT


Michael McCandless commented on LUCENE-4856:

bq. Maybe the method could be protected so if someone doesnt like whatever we default to,
they can subclass.

Good idea, I'll fix that.

bq. What will it do if the document doesnt have the field(s)? Return null?

It returns null ... I'll add a test.

bq. What score does the passage get?

I currently leave it at 0 ... maybe we should do NaN?  This would give
the formatter a way to detect the "missing highlights"?

bq. If we change the default, some docs need changing: e.g. "If no highlights were found for
a document, its value is <code>null</code>"

OK, I'll add a nocommit so I don't forget this ...

bq. In the main loop, this if check could then go? Or maybe this is the place to do this instead?

I'll move it up.  I'm not sure the if check can go ... does
BreakIterator ever return nothing?

bq. I think this would be extremely confusing with multiple fields...

Hmmm, true.  An app might highlight N fields and then would want to
see null on some of those fields so that it knows to use the other
field's highlights.

But I think the more common case is highlighting a big field (eg the
"body" field)?  I would lean towards defaulting this on, and adding
setter / or you subclass and override getEmptyHighlight to turn it
on.  Hmmm maybe getEmptyHighlight should take the field name...

> If no Passages are found for a doc, PostingsHighlighter should return first n sentences?
> ----------------------------------------------------------------------------------------
>                 Key: LUCENE-4856
>                 URL:
>             Project: Lucene - Core
>          Issue Type: Improvement
>          Components: modules/highlighter
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>             Fix For: 5.0, 4.3
>         Attachments: LUCENE-4856.patch

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

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

View raw message