lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Wettin <>
Subject More about the TermVectorMapper
Date Tue, 30 Oct 2007 00:51:43 GMT

25 okt 2007 kl. 01.23 skrev Karl Wettin:
> The use case is that I want a normalized frequency, and I'd like to  
> do that by loading the factor from an IndexReader in setExpectations.

Moving along in this code, how about passing down the current  
document number to the mapper? Perhaps in setExpectations, perhaps as  
a simple setter method.

Really no big deal to handle that my self via an ad hoc setter  
method, but I think it make sense that the mapper is aware of what  
document it is working with, that the mapper is told when it is used  
for a new/different document.

I reuse a (non thread safe) mapper to go easy on the GC, clearing it  
from data between mappings of different documents. It would be great  
if all that could be handled by the mapper, keeping the calling layer  
of code above that as thin as possible.


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

View raw message