1KinoSearch1::Search::QuUesreyrFiClotnetrr(i3b)uted PerlKDioncouSmeeanrtcaht1i:o:nSearch::QueryFilter(3)
2
3
4
6 KinoSearch1::Search::QueryFilter - build a filter based on results of a
7 query
8
10 my $books_only_query = KinoSearch1::Search::TermQuery->new(
11 term => KinoSearch1::Index::Term->new( 'category', 'books' );
12 );
13 my $filter = KinoSearch1::Search::QueryFilter->new(
14 query => $books_only_query;
15 );
16 my $hits = $searcher->search(
17 query => $query_string,
18 filter => $filter,
19 );
20
22 A QueryFilter spawns a result set that can be used to filter the
23 results of another query. The effect is very similar to adding a
24 required clause to a BooleanQuery -- however, a QueryFilter caches its
25 results, so it is more efficient if you use it more than once.
26
28 new
29 my $filter = KinoSearch1::Search::QueryFilter->new(
30 query => $query;
31 );
32
33 Constructor. Takes one hash-style parameter, "query", which must be an
34 object belonging to a subclass of KinoSearch1::Search::Query.
35
37 Copyright 2005-2010 Marvin Humphrey
38
40 See KinoSearch1 version 1.01.
41
42
43
44perl v5.32.0 2020-07-28KinoSearch1::Search::QueryFilter(3)