1Lucy::Search::Matcher(3U)ser Contributed Perl DocumentatiLouncy::Search::Matcher(3)
2
3
4

NAME

6       Lucy::Search::Matcher - Match a set of document ids.
7

SYNOPSIS

9           # abstract base class
10

DESCRIPTION

12       A Matcher iterates over a set of ascending document ids.  Some Matchers
13       implement score() and can assign relevance scores to the docs that they
14       match.  Other implementations may be match-only.
15

CONSTRUCTORS

17   new
18           my $matcher = MyMatcher->SUPER::new;
19
20       Abstract constructor.
21

ABSTRACT METHODS

23   next
24           my $int = $matcher->next();
25
26       Proceed to the next doc id.
27
28       Returns: A positive doc id, or 0 once the iterator is exhausted.
29
30   get_doc_id
31           my $int = $matcher->get_doc_id();
32
33       Return the current doc id.  Valid only after a successful call to
34       next() or advance() and must not be called otherwise.
35
36   score
37           my $float = $matcher->score();
38
39       Return the score of the current document.
40
41       Only Matchers which are used for scored search need implement score().
42

METHODS

44   advance
45           my $int = $matcher->advance($target);
46
47       Advance the iterator to the first doc id greater than or equal to
48       "target". The default implementation simply calls next() over and over,
49       but subclasses have the option of doing something more efficient.
50
51       ยท   target - A positive doc id, which must be greater than the current
52           doc id once the iterator has been initialized.
53
54       Returns: A positive doc id, or 0 once the iterator is exhausted.
55

INHERITANCE

57       Lucy::Search::Matcher isa Clownfish::Obj.
58
59
60
61perl v5.28.1                      2019-02-02          Lucy::Search::Matcher(3)
Impressum