Ticket #679: create
File create, 345 bytes (added by , 10 years ago) |
---|
Line | |
---|---|
1 | #!/usr/bin/perl |
2 | use strict; |
3 | use warnings; |
4 | use lib qw(. blib/arch); |
5 | use Xapian qw/:standard/; |
6 | |
7 | system "rm -rf index"; |
8 | mkdir "index"; |
9 | |
10 | my $db = Xapian::WritableDatabase->new( "index", DB_CREATE_OR_OPEN ); |
11 | for ( 1..100_000 ) { |
12 | my $document = Xapian::Document->new; |
13 | $document->add_posting('x'.$_, 1); |
14 | $db->add_document($document); |
15 | } |