parcel | Lucy |
class variable | LUCY_SEGREADER |
struct symbol | lucy_SegReader |
class nickname | lucy_SegReader |
header file | Lucy/Index/SegReader.h |
Lucy::Index::SegReader – Single-segment IndexReader.
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.
cfish_String*
lucy_SegReader_Get_Seg_Name(
lucy_SegReader *self
);
Return the name of the segment.
int64_t
lucy_SegReader_Get_Seg_Num(
lucy_SegReader *self
);
Return the number of the segment.
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.
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.
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.
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.
cfish_Vector* // incremented
lucy_SegReader_Seg_Readers(
lucy_SegReader *self
);
Return an array of all the SegReaders represented within the IndexReader.
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.
The name of the DataReader subclass that the desired component must implement.
lucy_DataReader*
lucy_SegReader_Fetch(
lucy_SegReader *self,
cfish_String *api
);
Fetch a component, or return NULL if the component can’t be found.
The name of the DataReader subclass that the desired component must implement.
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.
An array of DataReaders.
Doc id start offsets for each reader.
lucy_Schema*
lucy_SegReader_Get_Schema(
lucy_SegReader *self
);
Accessor for “schema” member var.
lucy_Folder*
lucy_SegReader_Get_Folder(
lucy_SegReader *self
);
Accessor for “folder” member var.
lucy_Snapshot*
lucy_SegReader_Get_Snapshot(
lucy_SegReader *self
);
Accessor for “snapshot” member var.
cfish_Vector*
lucy_SegReader_Get_Segments(
lucy_SegReader *self
);
Accessor for “segments” member var.
lucy_Segment*
lucy_SegReader_Get_Segment(
lucy_SegReader *self
);
Accessor for “segment” member var.
int32_t
lucy_SegReader_Get_Seg_Tick(
lucy_SegReader *self
);
Accessor for “seg_tick” member var.
Lucy::Index::SegReader is a Lucy::Index::IndexReader is a Lucy::Index::DataReader is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.