The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# Auto-generated file -- DO NOT EDIT!!!!!

# 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.

=head1 NAME

Lucy::Index::SegWriter - Write one segment of an index.



=head1 DESCRIPTION

SegWriter is a conduit through which information fed to Indexer passes.  It
manages L<Segment|Lucy::Index::Segment> and Inverter, invokes the
L<Analyzer|Lucy::Analysis::Analyzer> chain, and feeds low
level L<DataWriters|Lucy::Index::DataWriter> such as
PostingListWriter and DocWriter.

The sub-components of a SegWriter are determined by
L<Architecture|Lucy::Plan::Architecture>.  DataWriter components
which are added to the stack of writers via add_writer() have
add_inverted_doc() invoked for each document supplied to SegWriter's
add_doc().





=head1 METHODS

=head2 add_doc( I<[labeled params]> )

Add a document to the segment.  Inverts C<< doc >>, increments
the Segment's internal document id, then calls add_inverted_doc(),
feeding all sub-writers.

=head2 add_writer(writer)

Add a DataWriter to the SegWriter's stack of writers.

=head2 register( I<[labeled params]> )

Register a DataWriter component with the SegWriter.  (Note that
registration simply makes the writer available via fetch(), so you may
also want to call add_writer()).

=over

=item *

B<api> - The name of the DataWriter api which C<< writer >>
implements.

=item *

B<component> - A DataWriter.

=back

=head2 fetch(api)

Retrieve a registered component.

=over

=item *

B<api> - The name of the DataWriter api which the component
implements.

=back



=head1 INHERITANCE

Lucy::Index::SegWriter isa L<Lucy::Index::DataWriter> isa L<Lucy::Object::Obj>.


=cut