Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: kinosearch: discuss

myschema help

 

 

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded


chilibot at gmail

Jul 13, 2008, 10:13 PM

Post #1 of 2 (892 views)
Permalink
myschema help

Hi,

I am very new to kinosearch. 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.)

Any help is very much appreciated.

Hao


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


marvin at rectangular

Jul 14, 2008, 9:51 PM

Post #2 of 2 (825 views)
Permalink
Re: myschema help [In reply to]

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
http://www.rectangular.com/mailman/listinfo/kinosearch

kinosearch discuss RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.