String match = node.getAttribute("match");
if (match != null && match.length() > 0) {
try {
path = new NodePath(namespaces, match);
if (path.length() == 0)
throw new DatabaseConfigurationException("Range index module: Invalid match path in collection config: " + match);
} catch (IllegalArgumentException e) {
throw new DatabaseConfigurationException("Range index module: invalid qname in configuration: " + e.getMessage());
}
} else if (node.hasAttribute("qname")) {
QName qname = LuceneIndexConfig.parseQName(node, namespaces);
path = new NodePath(NodePath.SKIP);
path.addComponent(qname);
isQNameIndex = true;
}
String typeStr = node.getAttribute("type");
if (typeStr != null && typeStr.length() > 0) {
try {
this.type = Type.getType(typeStr);
} catch (XPathException e) {
throw new DatabaseConfigurationException("Invalid type declared for range index on " + match + ": " + typeStr);
}
}
String collation = node.getAttribute("collation");
if (collation != null && collation.length() > 0) {
try {
analyzer = new CollationKeyAnalyzer(RangeIndex.LUCENE_VERSION_IN_USE, Collations.getCollationFromURI(null, collation));
} catch (XPathException e) {
throw new DatabaseConfigurationException(e.getMessage(), e);
}
}
String nested = node.getAttribute("nested");
includeNested = (nested == null || nested.equalsIgnoreCase("yes"));