*/
private QName[] getDefinedIndexes(DBBroker broker, DocumentSet docs) {
final Set<QName> indexes = new HashSet<QName>();
for (final Iterator<org.exist.collections.Collection> i = docs.getCollectionIterator(); i.hasNext(); ) {
final org.exist.collections.Collection collection = i.next();
final IndexSpec idxConf = collection.getIndexConfiguration(broker);
if (idxConf != null) {
final FulltextIndexSpec fIdxConf = idxConf.getFulltextIndexSpec();
final List<QName> qnames = fIdxConf.getIndexedQNames();
for (final QName qName : qnames) {
indexes.add(qName);
}
}