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 14:11:48 GMT
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.

Why not make DEFAULT_MAX_THREAD_STATES a required parameter to indexwriter?

Hell lets make it so users have to supply all parameters to
everything, so everything is like
IndexWriter(int,int,int,int,int,int,int,int,int,int,int,int) and so
on. Then you will be satisfied there are no traps, but it will be
totally unusable.

---------------------------------------------------------------------
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