public QueryEngine getQueryEngine() {
checkLive();
return new QueryEngineImpl() {
@Override
protected ExecutionContext getExecutionContext() {
QueryIndexProvider provider = indexProvider;
if (hasPendingChanges()) {
provider = new UUIDDiffIndexProviderWrapper(
provider, getBaseState(), getRootState());
}
return new ExecutionContext(getBaseState(), rootTree, provider);