[KinoSearch] KSx-IndexManager 0.001
Marvin Humphrey
marvin at rectangular.com
Sun Jul 1 16:24:29 PDT 2007
On Jul 1, 2007, at 10:37 AM, Hans Dieter Pearcey wrote:
> I've just uploaded KSx-IndexManager 0.001.
I see that this module is now visible on search.cpan.org. (: ...and
so is KSx::Searcher::Abstract. :)
Cool stuff! The way it combines both indexing and searching reminds
me of Ferret::Index [that's a Ruby class for those of you unfamiliar
with Ferret] and Plucene::Simple (upon which KinoSearch::Simple is
loosely based). It's more like Ferret::Index, though, in that it
doesn't hide the interfaces of the classes it replaces -- you still
need to grok Schema, InvIndexer, Searcher, Hits, and implicitly,
FieldSpec and PolyAnalyzer in order to use it.
> I wrote this because I wanted to call fewer methods in code that
> dealt with
> invindexes (both reading and writing).
I can certainly see how using it will result in less code. You and I
appear to have different, but complementary ideas about class design,
and I'm cheesed to see your alternative approach. :)
KinoSearch has a few convenience methods here and there, notably
Schema->open and friends. For the most part, though, I try to avoid
them.
* Fewer moving parts, so fewer things can go wrong.
* Less work before users feel confident that they've grokked an
entire class and acquire a sense of mastery over it.
Convenience methods are a burden if you don't actually use them, and
different people often have different ideas about what's convenient.
I think KinoSearch itself needs to stay streamlined and low-level
enough that people such as yourself have no trouble assembling KS
components into larger tools.
However, I also find a lot of what you've done attractive. Those
write() and append() methods are pretty slick! On some level, it
would be nice to add them to InvIndexer itself, along with add_docs()
-- but having them available via your module distro is even better!
> Compare eg/invindex.pl to KinoSearch's
> sample/invindex.plx to get an idea of what IndexManager covers.
I think that file is actually missing from your distro. It's easy
for me at least to see what's going on, but can you please forward
some sample code to the list?
In addition to the minimalist apps, I'd like to see an example of how
you would use KSx::IndexManager::Plugin::Partition to choose one
invindex from among many at both index-time and search-time. KS has
MultiSearcher, but it doesn't provide a stock answer for how to
multiplex indexing; perhaps you've come up with a good model.
Marvin Humphrey
Rectangular Research
http://www.rectangular.com/
More information about the kinosearch
mailing list