[bdbxml] query many number of document
Koteswar <kotesh-XlBN/1irOrIlJZD/[email protected]> Tue, 18 Apr 2006 09:05:27 -0700 (PDT)
| Newsgroups | gmane.comp.db.dbxml.general |
|---|---|
| Message-ID | <[email protected]> |
This is my document (Roughly)
May contain maximum of 5 vers if have.
Like this I have 100,000 documents...
<drive name="c:">
<dir name="test" path="c:\test">
<file name="file.txt" path="c:\test\file.txt">
<ver>
<number>2</number>
<size>100</size>
<date>100</size>
<fileid>100</size>
<blk>
<num>1</num>
<length>200</length>
</blk>
</ver>
<ver>
<number>1</number>
<size>100</size>
<date>100</size>
<fileid>100</size>
<blk>
<num>1</num>
<length>200</length>
</blk>
</ver>
</file>
</dir>
</drive>
I have added the following indexes..
ad.addIndex( openedCont, "", "path","node-attribute-equality-string", txn,
updateContext );
ad.addIndex( openedCont, "",
"file","node-element-equality-string", txn, updateContext );
ad.addIndex( openedCont, "",
"dir","node-element-equality-string", txn, updateContext );
Its taking lot of time to get the results set for the queries below...
1. query =
"distinct-values("+collection+"//dir[@path=\""+path+"\"]/dir[1]/@path/string())";
2. query = collection+"//dir[@path=\""+path+"\"]/file[1]";
XmlQueryExpression nameExpr = theMgr.prepare(query, qc);
XmlResults nameResults = nameExpr.execute(qc);
System.out.println("xml result size "+nameResults.size());
XmlValue value = null; //results.next();
String name = "";
while(nameResults.hasNext()){
value = nameResults.next();
System.out.println(value.asString());
}
--
View this message in context: http://www.nabble.com/query-many-number-of-document-t1469044.html#a3971167
Sent from the Berkeley DB Xml - General forum at Nabble.com.
------------------------------------------
To remove yourself from this list, send an
email to [email protected]