KinoSearch::Search::RangeFilter - Filter search results by range of values.
my $filter = KinoSearch::Search::RangeFilter->new( field => 'date', lower_term => '2000-01-01', upper_term => '2001-01-01', include_lower => 1, include_upper => 0, ); my $hits = $searcher->search( query => $query, filter => $filter, );
RangeFilter allows you to limit search results to documents where the value for a particular field falls within a given range.
my $filter = KinoSearch::Search::RangeFilter->new( field => 'product_number', # required lower_term => '003', # see below upper_term => '060', # see below include_lower => 0, # default 1 include_upper => 0, # default 1 );
Constructor. Takes 5 hash-style parameters; field is required, as is at least one of either lower_term or upper_term.
field
lower_term
upper_term
field - The name of a field which is indexed but not analyzed.
indexed
analyzed
lower_term - Text string for the lower bound. If not supplied, all values less than upper_term will pass.
upper_term - Text string for the upper bound. If not supplied, all values greater than lower_term will pass.
include_lower - indicate whether docs which match lower_term should be included in the results.
include_upper - indicate whether docs which match upper_term should be included in the results.
Copyright 2007 Marvin Humphrey
See KinoSearch version 0.20.
To install KinoSearch, copy and paste the appropriate command in to your terminal.
cpanm
cpanm KinoSearch
CPAN shell
perl -MCPAN -e shell install KinoSearch
For more information on module installation, please visit the detailed CPAN module installation guide.