[bdbxml] disappearing default index
"Vries, Willem de (ELS)" <W.Vries-dUsxN/C1/[email protected]> Mon, 26 Sep 2005 10:36:58 +0100
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <D3E7986165D790478082E01DAD5DC3690780C060@elsamss31748.elsevier.com> |
Hi,
I am having a problem setting the default index.
In the first script the default index is set, and immediately afterwards
asked for its value. This gives me "none edge-element-substring-string". The
script also returns very fast, indicating that no indexing has taken place.
Running a second script asking for the default index it just returns "none".
1.
my $env = new DbEnv(0);
$env->set_cachesize(0, 64 * 1024, 1);
$env->open("/usr/local/dbxml-2.1.8/data",
Db::DB_INIT_MPOOL|Db::DB_CREATE|Db::DB_INIT_LOCK|Db::DB_INIT_LOG|Db::DB_INIT
_TXN);
my $mgr = new XmlManager($env);
my $containerTxn = $mgr->createTransaction();
my $container = $mgr->openContainer($containerTxn,"test0");
my $ix = $container->getIndexSpecification($containerTxn);
$ix->addDefaultIndex("edge-element-substring-string");
my $uc = $mgr->createUpdateContext();
$container->addDefaultIndex($containerTxn, $ix,$uc);
my $id = $ix->getDefaultIndex();
$containerTxn->commit();
print "$id\n";
>"none edge-element-substring-string"
2.
my $env = new DbEnv(0);
$env->set_cachesize(0, 64 * 1024, 1);
$env->open("/usr/local/dbxml-2.1.8/data",
Db::DB_INIT_MPOOL|Db::DB_CREATE|Db::DB_INIT_LOCK|Db::DB_INIT_LOG|Db::DB_INIT
_TXN);
my $mgr = new XmlManager($env);
my $containerTxn = $mgr->createTransaction();
my $container = $mgr->openContainer($containerTxn,"test0");
my $ix = $container->getIndexSpecification($containerTxn);
my $id = $ix->getDefaultIndex();
$containerTxn->commit();
print "$id\n";
>"none"
With kind regards,
W(im) S. de Vries LL M
Information Structure Technologist
Electronic Production Department
Elsevier Science NL
tel. (+31) 20 4852733
fax (+31) 20 4852812
Radarweg 29
1043 NX Amsterdam
The Netherlands
------------------------------------------
To remove yourself from this list, send an
email to [email protected]