Project Lucy has retired. For details please refer to its Attic page.
Lucy::Index::DocReader – C API Documentation
Apache Lucy™

Lucy::Index::DocReader

parcel Lucy
class variable LUCY_DOCREADER
struct symbol lucy_DocReader
class nickname lucy_DocReader
header file Lucy/Index/DocReader.h

Name

Lucy::Index::DocReader – Retrieve stored documents.

Description

DocReader defines the interface by which documents (with all stored fields) are retrieved from the index. The default implementation returns HitDoc objects.

Methods

Fetch_Doc (abstract)
lucy_HitDoc* // incremented
lucy_DocReader_Fetch_Doc(
    lucy_DocReader *self,
    int32_t doc_id
);

Retrieve the document identified by doc_id.

Returns: a HitDoc.

Aggregator
lucy_DocReader* // incremented
lucy_DocReader_Aggregator(
    lucy_DocReader *self,
    cfish_Vector *readers,
    lucy_I32Array *offsets
);

Returns a DocReader which divvies up requests to its sub-readers according to the offset range.

readers

An array of DocReaders.

offsets

Doc id start offsets for each reader.

Methods inherited from Lucy::Index::DataReader

Get_Schema
lucy_Schema*
lucy_DocReader_Get_Schema(
    lucy_DocReader *self
);

Accessor for “schema” member var.

Get_Folder
lucy_Folder*
lucy_DocReader_Get_Folder(
    lucy_DocReader *self
);

Accessor for “folder” member var.

Get_Snapshot
lucy_Snapshot*
lucy_DocReader_Get_Snapshot(
    lucy_DocReader *self
);

Accessor for “snapshot” member var.

Get_Segments
cfish_Vector*
lucy_DocReader_Get_Segments(
    lucy_DocReader *self
);

Accessor for “segments” member var.

Get_Segment
lucy_Segment*
lucy_DocReader_Get_Segment(
    lucy_DocReader *self
);

Accessor for “segment” member var.

Get_Seg_Tick
int32_t
lucy_DocReader_Get_Seg_Tick(
    lucy_DocReader *self
);

Accessor for “seg_tick” member var.

Inheritance

Lucy::Index::DocReader is a Lucy::Index::DataReader is a Clownfish::Obj.