lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: Any Detailed Explanation Available for TermsHashPerField class internals ?
Date Tue, 03 May 2016 16:40:33 GMT
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

http://blog.mikemccandless.com

On Tue, May 3, 2016 at 11:57 AM, shanghaihyj <shanghaihyj@163.com> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message