lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shanghaihyj <>
Subject Re:Re: Any Detailed Explanation Available for TermsHashPerField class internals ?
Date Thu, 05 May 2016 17:09:58 GMT
Thank you.

I read and got to understand ByteBlockPool.
A chain of slices can sit on a byte block, with these slices linked by forward addresses.
This suggests that multiple logical chains of slices can co-exist on the same byte block,
with their slices interleaving on the byte block.

In which scenario can such multiple chains of slices on the same byte block happen, which
is the purpose to invent ByteBlockPool ?
I do not know such a use case yet.

At 2016-05-04 00:40:33,"Michael McCandless" <> wrote:
>Why on earth would you start with this crazy Lucene class ;)
>Alas I don't think there's any additional documentation for it, and it is
>really hairy.
>It's basically a simplistic filesystem, where each unique term we've seen
>(for one in-memory segment) is a "file", and we don't know when we first
>see each term how many bytes it will use up, so we give it a small slice of
>the big byte[] store to begin.  Once it fills up that slice, we give it a
>bigger slice, leaving a pointer at the end of the first slice pointing to
>where the second slice starts, etc.
>Then, when it's time to flush, we can sequentially read all bytes for a
>given term, using the initReader to get the reader.
>Mike McCandless
>On Tue, May 3, 2016 at 11:57 AM, shanghaihyj <> wrote:
>> I am studying Lucene internals.
>> TermsHashPerField is the core to invert a field, which is so complex a
>> class for me to understand.
>> Is there any detailed articles / materials available to explain
>> TermsHashPerField's internals?
>> Best Wishes,
>> Yijian
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message