Ticket #679: search

File search, 482 bytes (added by Dmitry Karasik, 10 years ago)

demonstrates the problem

Line 
1#!/usr/bin/perl
2use strict;
3use warnings;
4
5use lib qw(. blib/arch);
6use Xapian qw/:standard/;
7use Memory::Usage;
8
9my $mu = Memory::Usage->new;
10
11{
12 my $db = Xapian::Database->new("index");
13 my $qp = Xapian::QueryParser->new($db);
14 $qp->set_max_wildcard_expansion(1_000_000);
15 my $query = $qp->parse_query('x*', FLAG_WILDCARD);
16 my $enq = $db->enquire($query);
17
18 $mu->record(__LINE__);
19 my $mset = $enq->get_mset(0, 10);
20 $mu->record(__LINE__);
21}
22$mu->record(__LINE__);
23$mu->dump;