-
-
21 Jun 2007 05:11:26 UTC
- Development release
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (10 / 7 / 0)
- Kwalitee
Bus factor: 0- License: perl_5
- Activity
24 month- Tools
- Download (456.89KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Marvin Humphrey <marvin at rectangular dot com>
- Dependencies
- Clone
- Compress::Zlib
- HTML::Parser
- Lingua::Stem::Snowball
- Lingua::StopWords
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
KinoSearch::Search::PolyFilter - Combine filters for a search.
SYNOPSIS
my $polyfilter = KinoSearch::Search::PolyFilter->new; $polyfilter->add( filter => $query_filter ); $polyfilter->add( filter => $range_filter, logic => 'AND' ); my $hits = $searcher->search( query => $query, filter => $polyfilter );
DESCRIPTION
A PolyFilter is a chain of Filter objects which may be combined using boolean logic, making it possible to do things like filter by multiple ranges, or to apply both a RangeFilter and a QueryFilter to the same query.
During search, the sub-filters are applied in the order that they were added.
METHODS
new
my $filter = KinoSearch::Search::PolyFilter->new;
Constructor. Takes no parameters.
add
$polyfilter->add( filter => $query_filter, # required logic => 'OR', # default: 'AND' );
Adds a filter to the query.
filter - the Filter object to add to the PolyFilter, which might be a QueryFilter, a RangeFilter, or another PolyFilter.
logic -
AND
,NOT
,OR
, orXOR
. Optional; default isAND
.
COPYRIGHT
Copyright 2005-2007 Marvin Humphrey
LICENSE, DISCLAIMER, BUGS, etc.
See KinoSearch version 0.20.
Module Install Instructions
To install KinoSearch, copy and paste the appropriate command in to your terminal.
cpanm KinoSearch
perl -MCPAN -e shell install KinoSearch
For more information on module installation, please visit the detailed CPAN module installation guide.