
marvin at rectangular
Jan 30, 2008, 10:36 AM
Post #1 of 1
(606 views)
Permalink
|
|
Extending SegWriter (was Re: Wildcards)
|
|
On Jan 29, 2008, at 8:06 PM, Nathan Kurz wrote: >> R-trees are a more efficient data structure for geospatial >> searching. However, there's no RTreeWriter writing R-tree data to >> each segment in KS by default. I'd like to write one and make it >> easy to integrate via InvIndexer/SegWriter. > > This is a beautiful concrete example. If KinoSearch was flexible > enough to > accommodate this smoothly, it seems likely it would be able to > accommodate a very wide range of other uses as well. At the indexing stage, I'm thinking something along these lines: my $r_tree_writer = KSx::RTree::RTreeWriter->new; my $seg_writer = KinoSearch::Index::SegWriter->new; $seg_writer->add_writer($r_tree_writer); my $invindexer = KinoSearch::InvIndexer->new( invindex => MySchema->open('/path/to/invindex'), seg_writer => $seg_writer, ); RTreeWriter would need to implement add_doc(), add_segment(), and finish(), plus possibly init(). Not that much to it! A lot of the work has already been done. We'll have to make a bunch of classes public, e.g. SegInfo, InStream/ OutStream, but those are all reasonably mature by now. Marvin Humphrey Rectangular Research http://www.rectangular.com/ _______________________________________________ KinoSearch mailing list KinoSearch [at] rectangular http://www.rectangular.com/mailman/listinfo/kinosearch
|