# ***********************************************
# 
# !!!! DO NOT EDIT !!!!
# 
# This file was auto-generated by Build.PL.
# 
# ***********************************************
# 
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
# 
#     http://www.apache.org/licenses/LICENSE-2.0
# 
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

=encoding utf8

=head1 NAME

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

=head1 SYNOPSIS

    # Abstract base class.

=head1 DESCRIPTION

DataReader is the companion class to
L<DataWriter|Lucy::Index::DataWriter>.  Every index component will
implement one of each.

=head1 CONSTRUCTORS

=head2 new

    my $reader = MyDataReader->new(
        schema   => $seg_reader->get_schema,      # default undef
        folder   => $seg_reader->get_folder,      # default undef
        snapshot => $seg_reader->get_snapshot,    # default undef
        segments => $seg_reader->get_segments,    # default undef
        seg_tick => $seg_reader->get_seg_tick,    # default -1
    );

Abstract constructor.

=over

=item *

B<schema> - A Schema.

=item *

B<folder> - A Folder.

=item *

B<snapshot> - A Snapshot.

=item *

B<segments> - An array of Segments.

=item *

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

=back

=head1 ABSTRACT METHODS

=head2 aggregator

    my $result = $data_reader->aggregator(
        readers => $readers,  # required
        offsets => $offsets,  # required
    );

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

=over

=item *

B<readers> - An array of DataReaders.

=item *

B<offsets> - Doc id start offsets for each reader.

=back

=head1 METHODS

=head2 get_schema

    my $schema = $data_reader->get_schema();

Accessor for “schema” member var.

=head2 get_folder

    my $folder = $data_reader->get_folder();

Accessor for “folder” member var.

=head2 get_snapshot

    my $snapshot = $data_reader->get_snapshot();

Accessor for “snapshot” member var.

=head2 get_segments

    my $arrayref = $data_reader->get_segments();

Accessor for “segments” member var.

=head2 get_segment

    my $segment = $data_reader->get_segment();

Accessor for “segment” member var.

=head2 get_seg_tick

    my $int = $data_reader->get_seg_tick();

Accessor for “seg_tick” member var.

=head1 INHERITANCE

Lucy::Index::DataReader isa Clownfish::Obj.

=cut

