-
-
11 Mar 2006 05:47:55 UTC
- Distribution: KinoSearch
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (5)
- Testers (4 / 3 / 0)
- Kwalitee
Bus factor: 0- License: perl_5
- Activity
24 month- Tools
- Download (169.28KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors- Marvin Humphrey <marvin at rectangular dot com>
- Dependencies
- Clone
- Lingua::Stem::Snowball
- Lingua::StopWords
- Sort::External
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
KinoSearch::Searcher - execute searches
SYNOPSIS
my $analyzer = KinoSearch::Analysis::PolyAnalyzer->new( language => 'en', ); my $searcher = KinoSearch::Searcher->new( invindex => $invindex, analyzer => $analyzer, ); my $hits = $searcher->search( query => 'foo bar' );
DESCRIPTION
Use the Searcher class to perform queries against an invindex.
METHODS
new
my $searcher = KinoSearch::Searcher->new( invindex => $invindex, analyzer => $analyzer, );
Constructor. Takes two labeled parameters, both of which are required.
invindex - can be either a path to an invindex, or a KinoSearch::Store::InvIndex object.
analyzer - An object which subclasses KinoSearch::Analysis::Analyer, such as a PolyAnalyzer. This must be identical to the Analyzer used at index-time, or the results won't match up.
search
my $hits = $searcher->search( query => $query );
Process a search and return a Hits object.
search() expects labeled hash-style parameters. At present, there is only one: query. It is likely that others will be added later.
query - Can be either an object which subclasses KinoSearch::Search::Query, or a query string. If it's a query string, it will be parsed using a QueryParser and a search will be performed against all indexed fields in the invindex. For more sophisticated searching, supply Query objects, such as TermQuery and BooleanQuery.
COPYRIGHT
Copyright 2005-2006 Marvin Humphrey
LICENSE, DISCLAIMER, BUGS, etc.
See KinoSearch version 0.08.
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.