Ticket #679: create

File create, 345 bytes (added by Dmitry Karasik, 10 years ago)

create test database

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