27 Oct 2007 19:46:10 UTC
- Development release
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (5)
- Testers (21 / 5 / 2)
- KwaliteeBus factor: 0
- License: perl_5
- Activity24 month
- Download (460.82KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionCREAMYG Marvin Humphreyand 1 contributors
- Marvin Humphrey <marvin at rectangular dot com>
KinoSearch::Search::PolyFilter - Combine filters for a search.
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 );
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.
my $filter = KinoSearch::Search::PolyFilter->new;
Constructor. Takes no parameters.
$polyfilter->add( filter => $query_filter, # required logic => 'OR', # default: 'AND' );
Adds a filter to the query.
XOR. Optional; default is
Copyright 2005-2007 Marvin Humphrey
See KinoSearch version 0.20.