[KinoSearch] basic search example - cant create object
Klaus Gruen
klaus_gruen at yahoo.com
Thu Jan 25 20:30:42 PST 2007
Hi,
So I was successful in creating an index using the example code, I think, and tried to run the example code provided below and get this error:
E:\>perl e:\tmp\kino_searchtest.pl
Can't call method "create_weight" on an undefined value at E:/Perl/site/lib/Kino
Search/Search/BooleanQuery.pm line 98.
Any ideas ?
use KinoSearch::Searcher;
use KinoSearch::Analysis::PolyAnalyzer;
my $analyzer
= KinoSearch::Analysis::PolyAnalyzer->new( language => 'en' );
my $searcher = KinoSearch::Searcher->new(
invindex => 'e:\tmp\kinosearch_indexes',
analyzer => $analyzer,
);
my $hits = $searcher->search( query => "foo bar" );
while ( my $hit = $hits->fetch_hit_hashref ) {
print "$hit->{title}\n";
}
---------------------------------
8:00? 8:25? 8:40? Find a flick in no time
with theYahoo! Search movie showtime shortcut.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.rectangular.com/pipermail/kinosearch/attachments/20070125/dbce4440/attachment.htm
More information about the kinosearch
mailing list