[Xapian-discuss] Testing for scalar intervals.

Jesper Krogh jesper at krogh.cc
Fri Dec 15 13:35:47 GMT 2006


Hi.

I'm new to Xapian.

I have "documents" that contains some scalar values.. and I'd like to
search them .. this is for example the "documentsize":

I've read this:
http://lists.tartarus.org/pipermail/xapian-discuss/2005-January/000681.html
That suggests:

    my $query = Search::Xapian::Query->new("foo");
    my $filter = Search::Xapian::Query->new(OP_OR, map {"XAGE$_"} (20..30));
    $filter = Search::Xapian::Query->new(OP_AND, $filter, "XSEXm");
    my $enquire = $db->enquire(OP_FILTER, $query, $filter);

But when search large intervals this filterexpression get large and the
performance suffers. .. And open intervals are even unsolved:

"give me documents matching "soap opera" that is larger than 1500 (bytes)"

Indexing "DOCSIZE1500" into the engine.

Is there a way to query the index for these scalar values .. or is
post-processing of the document-set the only option?

(Using the Perl-API for Xapian)

Jesper
-- 
Jesper Krogh




More information about the Xapian-discuss mailing list