Plucene/Search/Filter.pm

filter: Statementstmt 87.5% 7 / 8 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 83.3% 10 / 12 CC 1 SCAR 2.9
CC
1
Cov
88%
bits
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.3
« Plucene/Search/HitCollector.pm ↑ Summary Plucene/Document.pm »
1 package Plucene::Search::Filter;
2  
3 =head1 NAME
4  
5 Plucene::Search::Filter - A search filter base class
6  
7 =head1 DESCRIPTION
8  
9 This doesn't seem to be being used just yet. But here is some info
10 on filters:
11  
12 Filtering means imposing additional restriction on the hit list to
13 eliminate hits that otherwise would be included in the search results.
14  
15 There are two ways to filter hits:
16  
17 =over 4
18  
19 =item * Search Query - in this approach, provide your custom filter object
20 to the when you call the search() method. This filter will be called exactly
21 once to evaluate every document that resulted in non zero score.
22  
23 =item * Selective Collection - in this approach you perform the regular
24 search and when you get back the hit list, collect only those that matches
25 your filtering criteria. In this approach, your filter is called only for
26 hits that returned by the search method which may be only a subset of the
27 non zero matches (useful when evaluating your search filter is expensive).
28  
29 =back
30  
31 =cut
32  
33 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
34 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
35  
36 =head1 METHODS
37  
38 =head2 bits
39  
40 This must be defined in a subclass
41  
42 =cut
43  
44 0 ▶sub bits { die "bits must be defined in a subclass" }
Subroutine bits: not called CC=1 SCAR=6.9
Pod documented
45  
46 1 1;
« Plucene/Search/HitCollector.pm ↑ Summary Plucene/Document.pm »