1 | #!/usr/bin/perl
|
---|
2 | use strict;
|
---|
3 | use warnings;
|
---|
4 |
|
---|
5 | use lib qw(. blib/arch);
|
---|
6 | use Xapian qw/:standard/;
|
---|
7 | use Memory::Usage;
|
---|
8 |
|
---|
9 | my $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;
|
---|