protected void process(Changes changes) {
   try {
     searchEngine.index(context, changes.getChangeRequests());
   } catch (RuntimeException e) {
     Logger.getLogger(getClass())
         .error(e, JcrI18n.errorUpdatingQueryIndexes, e.getLocalizedMessage());
   }
 }
 @Override
 public QueryResults search(
     String workspaceName, String searchExpression, int maxRowCount, int offset) {
   SearchEngineProcessor processor = searchEngine.createProcessor(context, null, true);
   FullTextSearchRequest request =
       new FullTextSearchRequest(searchExpression, workspaceName, maxRowCount, offset);
   processor.process(request);
   return new org.modeshape.graph.query.process.QueryResults(
       request.getResultColumns(), request.getStatistics(), request.getTuples());
 }
 @Override
 public QueryResults query(
     String workspaceName,
     QueryCommand query,
     Schemata schemata,
     PlanHints hints,
     Map<String, Object> variables) {
   TypeSystem typeSystem = context.getValueFactories().getTypeSystem();
   SearchEngineProcessor processor = searchEngine.createProcessor(context, null, true);
   try {
     QueryContext context =
         new GraphQueryContext(
             schemata,
             typeSystem,
             hints,
             new SimpleProblems(),
             variables,
             processor,
             workspaceName);
     return queryEngine.execute(context, query);
   } finally {
     processor.close();
   }
 }