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

Lucy::Index::DataReader

parcel Lucy
class variable LUCY_DATAREADER
struct symbol lucy_DataReader
class nickname lucy_DataReader
header file Lucy/Index/DataReader.h

Name

Lucy::Index::DataReader – Abstract base class for reading index data.

Description

DataReader is the companion class to DataWriter. Every index component will implement one of each.

Functions

init
lucy_DataReader*
lucy_DataReader_init(
    lucy_DataReader *self,
    lucy_Schema *schema,
    lucy_Folder *folder,
    lucy_Snapshot *snapshot,
    cfish_Vector *segments,
    int32_t seg_tick
);

Abstract initializer.

schema

A Schema.

folder

A Folder.

snapshot

A Snapshot.

segments

An array of Segments.

seg_tick

The array index of the Segment object within the segments array that this particular DataReader is assigned to, if any. A value of -1 indicates that no Segment should be assigned.

Methods

Aggregator (abstract)
lucy_DataReader* // incremented
lucy_DataReader_Aggregator(
    lucy_DataReader *self,
    cfish_Vector *readers,
    lucy_I32Array *offsets
);

Create a reader which aggregates the output of several lower level readers. Return NULL if such a reader is not valid.

readers

An array of DataReaders.

offsets

Doc id start offsets for each reader.

Get_Schema
lucy_Schema*
lucy_DataReader_Get_Schema(
    lucy_DataReader *self
);

Accessor for “schema” member var.

Get_Folder
lucy_Folder*
lucy_DataReader_Get_Folder(
    lucy_DataReader *self
);

Accessor for “folder” member var.

Get_Snapshot
lucy_Snapshot*
lucy_DataReader_Get_Snapshot(
    lucy_DataReader *self
);

Accessor for “snapshot” member var.

Get_Segments
cfish_Vector*
lucy_DataReader_Get_Segments(
    lucy_DataReader *self
);

Accessor for “segments” member var.

Get_Segment
lucy_Segment*
lucy_DataReader_Get_Segment(
    lucy_DataReader *self
);

Accessor for “segment” member var.

Get_Seg_Tick
int32_t
lucy_DataReader_Get_Seg_Tick(
    lucy_DataReader *self
);

Accessor for “seg_tick” member var.

Inheritance

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