Hello,
I finally getting headage during the configuration of Xindice. I'm using
Xindice 1.1b3 (currently Ive tried a CVS checkout from today morning) in Jboss
with Jetty as exploded war-archive.
I've created a collection with following code snippet:
---------------------------------------------------------------
String collectionConfig = "<collection compressed=\"false\"
name=\""+collectionName+"\">"+
"<filer class=\"org.apache.xindice.core.filer.BTreeFiler\" gzip=\"false\"/>"+
"<indexes>"+
"<index class=\"org.apache.xindice.core.indexer.ValueIndexer\"
name=\"internalLink_attr_idx\" pattern=\"[EMAIL PROTECTED]" type=\"String\"/>"+
"<index class=\"org.apache.xindice.core.indexer.ValueIndexer\"
name=\"document_attr_idx\" pattern=\"document\" type=\"String\"/>"+
"</indexes>"+
"</collection>";
col = DatabaseManager.getCollection(uri);
CollectionManager collman = (CollectionManager)
col.getService("CollectionManager", "1.0");
try {
collman.createCollection(collectionName,
XercesHelper.string2Dom(collectionConfig));
}catch(Exception exe) {
String errMsg = "Error during the converting of the Collection-String to
XML-DOM";
log.error(errMsg);
throw new XMLDBException(ErrorCodes.VENDOR_ERROR, -1, errMsg, exe);
}
---------------------------------------------------------------
If I'm doing a search like "//[EMAIL PROTECTED]'170']", everything works fine,
except that it takes the same time as without an index.
If I'm trying to search for "//[EMAIL PROTECTED]'2045']", nothing happens, no
result, nothing. Without the index I will get some results back. This Xpath
search is very fast (80ms), but without any result it is obvious needless :)
The idx file of the first one is about 30kB in size, the second one is 6kB -
this is the default I think.
For the first Xpath Query it is only relevant, if this document exists in any
xml document in the collection. I've seen on MARC, that this could be done
faster, so that the result of this Xpath Query will be only the Document itself
or the id of the document. How is this possible?
Thank you all very much,
Sascha