NAME
Senna::Query - Senna Query (sen_query)
METHODS
open
new
Creates a new Senna::Query instance.
my $query = Senna::Query->new({
query => "...",
default_op => SEN_SEL_OR,
max_exprs => 256,
encpding => SEN_ENC_DEFAULT
});
new()
is a synonym for open()
.
close
exec
my $index = Senna::Index->open(...);
my $query = Senna::Query->open(...);
my $records = Senna::Records->open(...);
my $rc = $query->exec({
index => $index,
records => $records,
operator => SEN_SEL_OR
});
rest
snip
my $snip = $query->snip({
flags => $flags,
width => $width,
max_results => $max_results,
tags => [ [ '<foo>', '</foo>' ] ],
snip_mapping => ???
});
WARNING: This method hasn't been prorperly tested. Use at your own peril.
term
WARNING: This method has been reported broken as of libsenna 1.0.9 (see mailing list thread). It has been reported as "fixed", but no official release confirms this as of yet.