lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earwin Burrfoot <ear...@gmail.com>
Subject Re: Re(opening) (Multi)SegmentReaders
Date Mon, 18 May 2009 11:56:15 GMT
Will post one soon.

Had to slightly modify a whole bunch of tests relying on
IndexReader.open(dir) returning SegmentReader instance for
single-segment indexes.
Currently struggling with Clone/CloneNorms/Reopen tests that actually
verify old behaviour.

The fun part is - SR no longer has to pose as toplevel
directory-owning reader, so most of stuff moved from DIR to MSR and
now DIR is almost empty, save for static factory methods and a pair of
flags.
I'm going to remove DIR completely and make MSR/SR inherit directly from IR.

All affected classes/methods are package-private, so I bet that
doesn't hamper backwards compatibility?

2009/5/17 Michael McCandless <lucene@mikemccandless.com>:
> I tentatively think that's a good idea.  The reopen logic is quite hairy...
>
> Wanna make a separate patch for that?
>
> Mike
>
> On Sun, May 17, 2009 at 8:37 AM, Earwin Burrfoot <earwin@gmail.com> wrote:
>> While experimenting with indexReader 'components', I've got this thought:
>>
>> What if we always create MultiSegmentReader when (re)opening an index,
>> even if index contains a single segment?
>> Using unwrapped SegmentReader for single-segment case was a valid
>> optimization for the times when Lucene did collection over a single
>> reader, but now it goes down to SegmentReaders anyway.
>>
>> If we do that, (re)open logic will become a lot more transparent. (And
>> consequently, hooking into it)
>>
>> --
>> Kirill Zakharenko/Кирилл Захаренко (earwin@gmail.com)
>> Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423
>> ICQ: 104465785
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
>> For additional commands, e-mail: java-dev-help@lucene.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-dev-help@lucene.apache.org
>
>



-- 
Kirill Zakharenko/Кирилл Захаренко (earwin@gmail.com)
Home / Mobile: +7 (495) 683-567-4 / +7 (903) 5-888-423
ICQ: 104465785

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message