Grant Ingersoll wrote:

> 
> As for the cost of the seeks, why can't we just document that this is
> what is going on and discourage people from doing it?  

I'm just trying to keep SegmentTermPositions#getPayload() as efficient
as possible because it's often used in the most inner loops of scorers.
Keeping track of the start position of the payload adds overhead to that
method. I didn't profile it, maybe the overhead is not significant, but
I still don't see any usecase in which caching the latest payload is not
possible/sufficient. But maybe I'm missing one?


> I think caching it in SegTermPos. is the simplest

I don't think we should do caching here. Again, SegmentTermPositions is
used in inner loops, and often caching the last payload is not needed,
e. g. in BoostingTermQuery.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to