[KinoSearch] Using no analyzer with trunk
Peter Karman
peter at peknet.com
Sat Apr 11 19:09:31 PDT 2009
craigknox wrote on 4/11/09 8:22 PM:
>
> As I was testing the new code, I tried the following query:
> biosynthesis AND mammalian OR organic)s
>
> This results in a "bus error" regardless of whether I use my
> NameQueryParser class or the standard KinoSearch::QueryParser. I even
> get the same thing if I pass the query into the searcher directly as a
> string.
I'm sure Marvin will fix that error eventually; regardless, you'll probably want
to catch basic poor query syntax prior to handing it to KS anyway.
I use this little script in my own devel:
#!/usr/bin/perl
use strict;
use warnings;
use Data::Dump qw( dump );
use Search::QueryParser;
my $parser = Search::QueryParser->new;
for my $q (@ARGV) {
print $q . "\n";
my $parsed = $parser->parse($q);
if ( !$parsed ) {
warn $parser->err . "\n";
}
else {
print dump($parsed) . "\n";
}
}
>
> I imagine from the error message that this is a C error, but I am
> completely unfamiliar with C. Is there a way to get more information
> back about what is going on?
Marvin, I don't know if you have such a feature already, but something like
MySQL's EXPLAIN [0] feature might be a nice idea down the road. It wouldn't
address this particular problem, but it got me thinking about understanding how
the QP works.
[0[ http://dev.mysql.com/doc/refman/5.0/en/explain.html
--
Peter Karman . http://peknet.com/ . peter at peknet.com
More information about the kinosearch
mailing list