if (!context.getUser().hasDbaRole())
throw new XPathException(this, "user has to be a member of the dba group to call " +
"the optimize function. Calling user was " + context.getUser().getName());
LuceneIndexWorker index = (LuceneIndexWorker)
context.getBroker().getIndexController().getWorkerByIndexId(LuceneIndex.ID);
index.optimize();
return Sequence.EMPTY_SEQUENCE;
}
}