1Lucy::Index::DataReaderU(s3e)r Contributed Perl DocumentaLtuicoyn::Index::DataReader(3)
2
3
4

NAME

6       Lucy::Index::DataReader - Abstract base class for reading index data.
7

SYNOPSIS

9           # Abstract base class.
10

DESCRIPTION

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

CONSTRUCTORS

16   new
17           my $reader = MyDataReader->new(
18               schema   => $seg_reader->get_schema,      # default undef
19               folder   => $seg_reader->get_folder,      # default undef
20               snapshot => $seg_reader->get_snapshot,    # default undef
21               segments => $seg_reader->get_segments,    # default undef
22               seg_tick => $seg_reader->get_seg_tick,    # default -1
23           );
24
25       Abstract constructor.
26
27       ·   schema - A Schema.
28
29       ·   folder - A Folder.
30
31       ·   snapshot - A Snapshot.
32
33       ·   segments - An array of Segments.
34
35       ·   seg_tick - The array index of the Segment object within the
36           "segments" array that this particular DataReader is assigned to, if
37           any.  A value of -1 indicates that no Segment should be assigned.
38

ABSTRACT METHODS

40   aggregator
41           my $result = $data_reader->aggregator(
42               readers => $readers,  # required
43               offsets => $offsets,  # required
44           );
45
46       Create a reader which aggregates the output of several lower level
47       readers.  Return undef if such a reader is not valid.
48
49       ·   readers - An array of DataReaders.
50
51       ·   offsets - Doc id start offsets for each reader.
52

METHODS

54   get_schema
55           my $schema = $data_reader->get_schema();
56
57       Accessor for XschemaX member var.
58
59   get_folder
60           my $folder = $data_reader->get_folder();
61
62       Accessor for XfolderX member var.
63
64   get_snapshot
65           my $snapshot = $data_reader->get_snapshot();
66
67       Accessor for XsnapshotX member var.
68
69   get_segments
70           my $arrayref = $data_reader->get_segments();
71
72       Accessor for XsegmentsX member var.
73
74   get_segment
75           my $segment = $data_reader->get_segment();
76
77       Accessor for XsegmentX member var.
78
79   get_seg_tick
80           my $int = $data_reader->get_seg_tick();
81
82       Accessor for Xseg_tickX member var.
83

INHERITANCE

85       Lucy::Index::DataReader isa Clownfish::Obj.
86
87
88
89perl v5.32.0                      2020-07-28        Lucy::Index::DataReader(3)
Impressum