use of org.apache.jackrabbit.core.query.lucene.join.QueryEngine in project jackrabbit by apache.
the class QueryObjectModelImpl method execute.
public QueryResult execute() throws RepositoryException {
long time = System.nanoTime();
final QueryResult result = sessionContext.getSessionState().perform(new SessionOperation<QueryResult>() {
public QueryResult perform(SessionContext context) throws RepositoryException {
final QueryEngine engine = new QueryEngine(sessionContext.getSessionImpl(), lqf, variables);
return engine.execute(getColumns(), getSource(), getConstraint(), getOrderings(), offset, limit);
}
public String toString() {
return "query.execute(" + statement + ")";
}
});
time = System.nanoTime() - time;
final long timeMs = time / 1000000;
log.debug("executed in {} ms. ({})", timeMs, statement);
RepositoryStatisticsImpl statistics = sessionContext.getRepositoryContext().getRepositoryStatistics();
statistics.getCounter(Type.QUERY_COUNT).incrementAndGet();
statistics.getCounter(Type.QUERY_DURATION).addAndGet(timeMs);
sessionContext.getRepositoryContext().getStatManager().getQueryStat().logQuery(language, statement, timeMs);
return result;
}
Aggregations