[KinoSearch] myschema help

Marvin Humphrey marvin at rectangular.com
Mon Jul 14 21:51:49 PDT 2008




On Jul 13, 2008, at 10:13 PM, Hao Chen wrote:

> I've got basic indexing and searching working thanks to the  
> wonderful tutorial. Now I am trying to implement a boolean search  
> function. It seems to me the best way is to use query_parser, which  
> requires a schema. However, when I put
>
> package MySchema;
> use base qw(KinoSearch::Schema);
> use KinoSearch::Analysis::PolyAnalyzer;
>
> in my index script, I got the following error:
>
> Base class package "KinoSearch::Schema" is empty.
>    (Perhaps you need to 'use' the module which defines that package  
> first.)

It seems like you have the stable 0.1x branch installed and have  
followed the tutorial that comes with that, but are attempting to  
follow the documentation for the version of QueryParser which ships  
with the 0.20_xx branch.

You should probably just use this in any case, as it uses QueryParser  
internally:

   my $hits = $searcher->search( query => $query_string );

Marvin Humphrey
Rectangular Research
http://www.rectangular.com/


_______________________________________________
KinoSearch mailing list
KinoSearch at rectangular.com
http://www.rectangular.com/mailman/listinfo/kinosearch




More information about the kinosearch mailing list