lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Elschot <>
Subject Re: Why ORScorer delayed init?
Date Tue, 10 Apr 2007 19:33:48 GMT
On Tuesday 10 April 2007 20:24, Yonik Seeley wrote:
> On 4/10/07, Marvin Humphrey <> wrote:
> > In DisjunctionSumScorer, both skipTo() and next() invoke
> > initScorerDocQueue() on the first iteration.  However, since all
> > subscorers are added en masse via the constructor instead of
> > individually via an add() method which does not exist for this class,
> > it would be possible to trigger initScorerDocQueue() at construction
> > time rather than defer it, slightly simplifying the inner loop methods.
> Yes, I think I made this change to one or two of the other scorers in the 
> It makes more sense to me to pass everything needed in the constructor
> and get rid of the firstTime checks in next() and skipTo()

I kept this method of initializing because it was present in some
other existing Scorers. I did not really like it at the time either.

I thought it would avoid accessing the index as much as
possible before actually doing a search, but I did not
verify whether that is important.
In case it is not, any simplification is off course welcome.

Paul Elschot

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

View raw message