Lucy::...Reader(3pm)
π Lucy::...Reader(3pm) π
okay bestie, so this is a page from the User Contributed Perl Documentation for Lucy, and it's literally all about the Lucy::Index::DocReader situation. she's giving very much "interface energy" and we're gonna walk through her together, no cap. π
β¨ NAME β¨
Lucy::Index::DocReader β the way you go get your stored documents back out. ποΈβ¨
πΈ SYNOPSIS πΈ
my $doc_reader = $seg_reader->obtain("Lucy::Index::DocReader");
my $doc = $doc_reader->fetch_doc($doc_id);
like, that's it. that's the whole vibe. two lines and you're fetching docs. π
π¦ DESCRIPTION π¦
so DocReader defines the interface by which documents β and by "documents" we mean the full package, all the stored fields, every last one β get retrieved from the index. π«Ά
the default implementation hands you back HitDoc objects. that's the tea. β
π ABSTRACT METHODS π
fetch_doc
my $hit_doc = $doc_reader->fetch_doc($doc_id);
okay so you call this and you grab the document that doc_id is pointing at. that's the whole job. β¨
Returns: a HitDoc. π
π₯ METHODS π₯
aggregator
my $result = $doc_reader->aggregator(
readers => $readers, # required
offsets => $offsets, # required
);
this one returns a DocReader that divvies up all the requests among its sub-readers based on the offset range. like a little delegation queen. π
readersβ an array ofDocReaders. (required, bestie, don't forget her π)offsetsβ doc id start offsets for each reader. (also required!! π)
π INHERITANCE π
Lucy::Index::DocReader isa Lucy::Index::DataReader isa Clownfish::Obj. a whole little family tree, iconic honestly. π§
and that's the page!! this was documented with perl v5.42.0, dated 2025-07-25, and filed under Lucy::...Reader(3pm) β mwah, go forth and fetch docs bestie πβ¨
π¦ where this page comes from
- fedora 43: perl-Lucy 0.6.2-26.fc43 Β· Apache-2.0 AND MIT AND Unicode-DFS-2015
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms