lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Earwin Burrfoot <ear...@gmail.com>
Subject IR static methods
Date Wed, 03 Jun 2009 12:08:50 GMT
I have a strong desire to remove all these static methods from IR -
lastModified, getCurrentVersion, getCommitUserData, indexExists.
But haven't found a good place for them yet.

Directory - is a bad place, it shouldn't concern itself with details
of what exactly is stored inside, it should think of 'how' it is
stored.
IndexReader - is bad, it is too heavyweight to be created for getting
something simple once.

We should probably create some new lightweight class that provides a
kind of reflection for the index? Mod dates, versions, userdata,
existence, sizes, deletions, whatever. Both per-index and per-segment.
Essentially it is a wrapper over SegmentInfos that allows us to keep
them hidden (and thus easily changeable), and provides users with more
concise and adequate interface.

Any thoughts?

-- 
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