/usr/lib/x86_64-linux-gnu/perl5/5.24/Lucy/Index/DataWriter.pod is in liblucy-perl 0.3.3-7+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 | # 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::DataWriter - Write data to an index.
=head1 SYNOPSIS
# Abstract base class.
=head1 DESCRIPTION
DataWriter is an abstract base class for writing index data, generally in
segment-sized chunks. Each component of an index -- e.g. stored fields,
lexicon, postings, deletions -- is represented by a
DataWriter/L<DataReader|Lucy::Index::DataReader> pair.
Components may be specified per index by subclassing
L<Architecture|Lucy::Plan::Architecture>.
=head1 CONSTRUCTORS
=head2 new( I<[labeled params]> )
my $writer = MyDataWriter->new(
snapshot => $snapshot, # required
segment => $segment, # required
polyreader => $polyreader, # required
);
=over
=item *
B<snapshot> - The Snapshot that will be committed at the end of the
indexing session.
=item *
B<segment> - The Segment in progress.
=item *
B<polyreader> - A PolyReader representing all existing data in the
index. (If the index is brand new, the PolyReader will have no
sub-readers).
=back
=head1 ABSTRACT METHODS
=head2 add_inverted_doc( I<[labeled params]> )
Process a document, previously inverted by C<< inverter >>.
=over
=item *
B<inverter> - An Inverter wrapping an inverted document.
=item *
B<doc_id> - Internal number assigned to this document within the
segment.
=back
=head2 add_segment( I<[labeled params]> )
Add content from an existing segment into the one currently being
written.
=over
=item *
B<reader> - The SegReader containing content to add.
=item *
B<doc_map> - An array of integers mapping old document ids to
new. Deleted documents are mapped to 0, indicating that they should be
skipped.
=back
=head2 finish()
Complete the segment: close all streams, store metadata, etc.
=head2 format()
Every writer must specify a file format revision number, which should
increment each time the format changes. Responsibility for revision
checking is left to the companion DataReader.
=head1 METHODS
=head2 delete_segment(reader)
Remove a segment's data. The default implementation is a no-op, as
all files within the segment directory will be automatically deleted.
Subclasses which manage their own files outside of the segment system
should override this method and use it as a trigger for cleaning up
obsolete data.
=over
=item *
B<reader> - The SegReader containing content to merge, which must
represent a segment which is part of the the current snapshot.
=back
=head2 merge_segment( I<[labeled params]> )
Move content from an existing segment into the one currently being
written.
The default implementation calls add_segment() then delete_segment().
=over
=item *
B<reader> - The SegReader containing content to merge, which must
represent a segment which is part of the the current snapshot.
=item *
B<doc_map> - An array of integers mapping old document ids to
new. Deleted documents are mapped to 0, indicating that they should be
skipped.
=back
=head2 metadata()
Arbitrary metadata to be serialized and stored by the Segment. The
default implementation supplies a Hash with a single key-value pair for
"format".
=head2 get_snapshot()
Accessor for "snapshot" member var.
=head2 get_segment()
Accessor for "segment" member var.
=head2 get_polyreader()
Accessor for "polyreader" member var.
=head2 get_schema()
Accessor for "schema" member var.
=head2 get_folder()
Accessor for "folder" member var.
=head1 INHERITANCE
Lucy::Index::DataWriter isa L<Lucy::Object::Obj>.
=cut
|