# ***********************************************
#
# !!!! 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::Search::Matcher - Match a set of document ids.
=head1 SYNOPSIS
# abstract base class
=head1 DESCRIPTION
A Matcher iterates over a set of ascending document ids. Some Matchers
implement L<score()|/score> and can assign relevance scores to the docs that they
match. Other implementations may be match-only.
=head1 CONSTRUCTORS
=head2 new
my $matcher = MyMatcher->SUPER::new;
Abstract constructor.
=head1 ABSTRACT METHODS
=head2 next
my $int = $matcher->next();
Proceed to the next doc id.
Returns: A positive doc id, or 0 once the iterator is exhausted.
=head2 get_doc_id
my $int = $matcher->get_doc_id();
Return the current doc id. Valid only after a successful call to
L<next()|/next> or L<advance()|/advance> and must not be called otherwise.
=head2 score
my $float = $matcher->score();
Return the score of the current document.
Only Matchers which are used for scored search need implement L<score()|/score>.
=head1 METHODS
=head2 advance
my $int = $matcher->advance($target);
Advance the iterator to the first doc id greater than or equal to
C<target>. The default implementation simply calls L<next()|/next>
over and over, but subclasses have the option of doing something more
efficient.
=over
=item *
B<target> - A positive doc id, which must be greater than the current
doc id once the iterator has been initialized.
=back
Returns: A positive doc id, or 0 once the iterator is exhausted.
=head1 INHERITANCE
Lucy::Search::Matcher isa Clownfish::Obj.
=cut