lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Muir <rcm...@gmail.com>
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
<lucene@mikemccandless.com> wrote:
> On Tue, Oct 15, 2013 at 10:11 AM, Robert Muir <rcmuir@gmail.com> wrote:
>> On Tue, Oct 15, 2013 at 9:59 AM, Michael McCandless
>> <lucene@mikemccandless.com> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message