public LuceneIndexConfig(Element config, Map<String, String> namespaces, AnalyzerConfig analyzers,
Map<String, FieldType> fieldTypes) throws DatabaseConfigurationException {
if (config.hasAttribute(QNAME_ATTR)) {
QName qname = parseQName(config, namespaces);
path = new NodePath(qname);
isQNameIndex = true;
} else {
String matchPath = config.getAttribute(MATCH_ATTR);
try {
path = new NodePath(namespaces, matchPath);
if (path.length() == 0)
throw new DatabaseConfigurationException("Lucene module: Invalid match path in collection config: " +
matchPath);
} catch (IllegalArgumentException e) {
throw new DatabaseConfigurationException("Lucene module: invalid qname in configuration: " + e.getMessage());