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

Lucy::Index::SegReader

parcel Lucy
class variable LUCY_SEGREADER
struct symbol lucy_SegReader
class nickname lucy_SegReader
header file Lucy/Index/SegReader.h

Name

Lucy::Index::SegReader – Single-segment IndexReader.

Description

SegReader interprets the data within a single segment of an index.

Generally speaking, only advanced users writing subclasses which manipulate data at the segment level need to deal with the SegReader API directly.

Nearly all of SegReader’s functionality is implemented by pluggable components spawned by Architecture’s factory methods.

Methods

Get_Seg_Name
cfish_String*
lucy_SegReader_Get_Seg_Name(
    lucy_SegReader *self
);

Return the name of the segment.

Get_Seg_Num
int64_t
lucy_SegReader_Get_Seg_Num(
    lucy_SegReader *self
);

Return the number of the segment.

Del_Count
int32_t
lucy_SegReader_Del_Count(
    lucy_SegReader *self
);

Return the number of documents which have been marked as deleted but not yet purged from the index.

Doc_Max
int32_t
lucy_SegReader_Doc_Max(
    lucy_SegReader *self
);

Return the maximum number of documents available to the reader, which is also the highest possible internal document id. Documents which have been marked as deleted but not yet purged from the index are included in this count.

Doc_Count
int32_t
lucy_SegReader_Doc_Count(
    lucy_SegReader *self
);

Return the number of documents available to the reader, subtracting any that are marked as deleted.

Offsets
lucy_I32Array* // incremented
lucy_SegReader_Offsets(
    lucy_SegReader *self
);

Return an array with one entry for each segment, corresponding to segment doc_id start offset.

Seg_Readers
cfish_Vector* // incremented
lucy_SegReader_Seg_Readers(
    lucy_SegReader *self
);

Return an array of all the SegReaders represented within the IndexReader.

Methods inherited from Lucy::Index::IndexReader

Obtain
lucy_DataReader*
lucy_SegReader_Obtain(
    lucy_SegReader *self,
    cfish_String *api
);

Fetch a component, or throw an error if the component can’t be found.

api

The name of the DataReader subclass that the desired component must implement.

Fetch
lucy_DataReader*
lucy_SegReader_Fetch(
    lucy_SegReader *self,
    cfish_String *api
);

Fetch a component, or return NULL if the component can’t be found.

api

The name of the DataReader subclass that the desired component must implement.

Methods inherited from Lucy::Index::DataReader

Aggregator (abstract)
lucy_DataReader* // incremented
lucy_SegReader_Aggregator(
    lucy_SegReader *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_SegReader_Get_Schema(
    lucy_SegReader *self
);

Accessor for “schema” member var.

Get_Folder
lucy_Folder*
lucy_SegReader_Get_Folder(
    lucy_SegReader *self
);

Accessor for “folder” member var.

Get_Snapshot
lucy_Snapshot*
lucy_SegReader_Get_Snapshot(
    lucy_SegReader *self
);

Accessor for “snapshot” member var.

Get_Segments
cfish_Vector*
lucy_SegReader_Get_Segments(
    lucy_SegReader *self
);

Accessor for “segments” member var.

Get_Segment
lucy_Segment*
lucy_SegReader_Get_Segment(
    lucy_SegReader *self
);

Accessor for “segment” member var.

Get_Seg_Tick
int32_t
lucy_SegReader_Get_Seg_Tick(
    lucy_SegReader *self
);

Accessor for “seg_tick” member var.

Inheritance

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