lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <>
Subject Re: PostingsHighlighter/PassageFormatter has zero matches for some results
Date Tue, 15 Oct 2013 15:04:39 GMT
On Tue, Oct 15, 2013 at 10:57 AM, Michael McCandless
<> wrote:
> On Tue, Oct 15, 2013 at 10:11 AM, Robert Muir <> wrote:
>> On Tue, Oct 15, 2013 at 9:59 AM, Michael McCandless
>> <> wrote:
>>> Well, unfortunately, this is a trap that users do hit.
>>> By requiring the user to think about the limit on creating
>>> PostingsHighlighter, he/she would think about it and realize they are
>>> in fact setting a limit.
>>> Silent limits are dangerous because you don't offhand know what's
>>> wrong / why you see nothing getting highlighted.
>> I already made my argument: for 99% of use cases the defaults are
>> fine. In most cases highlighting is trying to summarize the document
>> and something that deep just doesnt contribute much (see the default
>> scoring model!). There is an optional ctor for the others doing expert
>> things to specify the length.
>> I don't think we should make APIs unusable because you think XYZ is a trap.
> How would this make the APIs unusable?
> I don't think requiring the user to set the truncation (a single int
> parameter) up front is "unusable"?
> Instead, it's making it clear that this class silently discards tokens
> from the document, which I think is dangerous for any class to
> silently do.  The user needs to think about what to pass, and realize
> what they pass means truncation is happening.

Its a summarizer: its whole purpose is to truncate the document :)

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

View raw message