# ***********************************************
#
# !!!! 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::Lexicon - Iterator for a field’s terms.
=head1 SYNOPSIS
my $lex_reader = $seg_reader->obtain('Lucy::Index::LexiconReader');
my $lexicon = $lex_reader->lexicon( field => 'content' );
while ( $lexicon->next ) {
print $lexicon->get_term . "\n";
}
=head1 DESCRIPTION
A Lexicon is an iterator which provides access to all the unique terms for
a given field in sorted order.
If an index consists of two documents with a ‘content’ field holding “three
blind mice” and “three musketeers” respectively, then iterating through the
‘content’ field’s lexicon would produce this list:
blind
mice
musketeers
three
=head1 ABSTRACT METHODS
=head2 seek
$lexicon->seek($target);
$lexicon->seek(); # default: undef
Seek the Lexicon to the first iterator state which is greater than or
equal to C<target>. If C<target> is undef,
reset the iterator.
=head2 next
my $bool = $lexicon->next();
Proceed to the next term.
Returns: true until the iterator is exhausted, then false.
=head2 reset
$lexicon->reset();
Reset the iterator. L<next()|/next> must be called to proceed to the first
element.
=head2 get_term
my $obj = $lexicon->get_term();
Return the current term, or undef if the iterator is not in a
valid state.
=head1 INHERITANCE
Lucy::Index::Lexicon isa Clownfish::Obj.
=cut