incubator-lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marvin Humphrey <>
Subject Class hierarchy
Date Fri, 11 Sep 2009 17:27:02 GMT

The two Lucy classes we can expect will be used most often are the
single-machine searcher and the single-machine indexer.  Close behind them
will be Schema, the document class and the query parser.  

Huffman coding naming principles dictate that classes whose names are typed
most often should have the shortest names.  Therefore, instead of locating
common classes within sub-trees, we should locate them at the first level --
directly underneath Lucy.


Schema, Doc, QueryParser, and probably Indexer will all descend from Lucy::Obj.
Searcher, however, will descend from the abstract base class Searchable, which
definitely belongs under Lucy::Search.


Java Lucene is divided up into multiple Java packages.  Theoretically, this
enforces a certain discipline, but in practice, the "search", "index",
"analysis", etc. packages are never distributed separately.

In contrast, core Lucy should be conceived of as a single bundle of files.
This gives us the freedom to apply hacks and band-aids which reach across
sub-trees if need be.  It also makes sense, if we see "Lucy" as a single
entity, for Lucy::Searcher to subclass Lucy::Search::Searchable, whereas that
would not really be appropriate if "Lucy::Search" was an atomic unit.

Marvin Humphrey

View raw message