@Override protected final void closeInternal() { try { clearReleasables(Lifetime.CONTEXT); } finally { doClose(); } }
private void cleanContext(SearchContext context) { try { context.clearReleasables(Lifetime.PHASE); context.setTask(null); } finally { context.decRef(); } }
throw ExceptionsHelper.convertToElastic(e); } finally { context.clearReleasables(Lifetime.COLLECTION);
throw new QueryPhaseExecutionException(context, "Failed to execute global aggregators", e); } finally { context.clearReleasables(SearchContext.Lifetime.COLLECTION);
@Override public final void decRef() { int i = refCount.decrementAndGet(); assert i >= 0; if (i == 0) { try { clearReleasables(Lifetime.CONTEXT); } finally { doClose(); } } }
private void cleanContext(SearchContext context) { try { context.clearReleasables(Lifetime.PHASE); context.setTask(null); } finally { context.decRef(); } }
@Override protected final void closeInternal() { try { clearReleasables(Lifetime.CONTEXT); } finally { doClose(); } }
@Override protected final void closeInternal() { try { clearReleasables(Lifetime.CONTEXT); } finally { doClose(); } }
@Override protected final void closeInternal() { try { clearReleasables(Lifetime.CONTEXT); } finally { doClose(); } }
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.explain() == false) { return; } try { final int topLevelDocId = hitContext.hit().docId(); Explanation explanation = context.searcher().explain(context.query(), topLevelDocId); for (RescoreContext rescore : context.rescore()) { explanation = rescore.rescorer().explain(topLevelDocId, context.searcher(), rescore, explanation); } // we use the top level doc id, since we work with the top level searcher hitContext.hit().explanation(explanation); } catch (IOException e) { throw new FetchPhaseExecutionException(context, "Failed to explain doc [" + hitContext.hit().getType() + "#" + hitContext.hit().getId() + "]", e); } finally { context.clearReleasables(SearchContext.Lifetime.COLLECTION); } } }
searchContext.clearReleasables(SearchContext.Lifetime.COLLECTION);
private void cleanContext(SearchContext context) { try { context.clearReleasables(Lifetime.PHASE); context.setTask(null); } finally { context.decRef(); } }
private void cleanContext(SearchContext context) { try { context.clearReleasables(Lifetime.PHASE); context.setTask(null); TokenRangesSearcherWrapper.removeCurrent(); } finally { context.decRef(); } }
private void cleanContext(SearchContext context) { try { assert context == SearchContext.current(); context.clearReleasables(Lifetime.PHASE); SearchContext.removeCurrent(); } finally { context.decRef(); } }
throw ExceptionsHelper.convertToElastic(e); } finally { context.clearReleasables(Lifetime.COLLECTION);
@Override public void hitExecute(SearchContext context, HitContext hitContext) { try { final int topLevelDocId = hitContext.hit().docId(); Explanation explanation = context.searcher().explain(context.query(), topLevelDocId); for (RescoreSearchContext rescore : context.rescore()) { explanation = rescore.rescorer().explain(topLevelDocId, context, rescore, explanation); } // we use the top level doc id, since we work with the top level searcher hitContext.hit().explanation(explanation); } catch (IOException e) { throw new FetchPhaseExecutionException(context, "Failed to explain doc [" + hitContext.hit().type() + "#" + hitContext.hit().id() + "]", e); } finally { context.clearReleasables(SearchContext.Lifetime.COLLECTION); } } }
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.explain() == false) { return; } try { final int topLevelDocId = hitContext.hit().docId(); Explanation explanation = context.searcher().explain(context.query(), topLevelDocId); for (RescoreSearchContext rescore : context.rescore()) { explanation = rescore.rescorer().explain(topLevelDocId, context, rescore, explanation); } // we use the top level doc id, since we work with the top level searcher hitContext.hit().explanation(explanation); } catch (IOException e) { throw new FetchPhaseExecutionException(context, "Failed to explain doc [" + hitContext.hit().type() + "#" + hitContext.hit().id() + "]", e); } finally { context.clearReleasables(SearchContext.Lifetime.COLLECTION); } } }
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.explain() == false) { return; } try { final int topLevelDocId = hitContext.hit().docId(); Explanation explanation = context.searcher().explain(context.query(), topLevelDocId); for (RescoreContext rescore : context.rescore()) { explanation = rescore.rescorer().explain(topLevelDocId, context.searcher(), rescore, explanation); } // we use the top level doc id, since we work with the top level searcher hitContext.hit().explanation(explanation); } catch (IOException e) { throw new FetchPhaseExecutionException(context, "Failed to explain doc [" + hitContext.hit().getType() + "#" + hitContext.hit().getId() + "]", e); } finally { context.clearReleasables(SearchContext.Lifetime.COLLECTION); } } }
@Override public void hitExecute(SearchContext context, HitContext hitContext) { if (context.explain() == false) { return; } try { final int topLevelDocId = hitContext.hit().docId(); Explanation explanation = context.searcher().explain(context.query(), topLevelDocId); for (RescoreContext rescore : context.rescore()) { explanation = rescore.rescorer().explain(topLevelDocId, context.searcher(), rescore, explanation); } // we use the top level doc id, since we work with the top level searcher hitContext.hit().explanation(explanation); } catch (IOException e) { throw new FetchPhaseExecutionException(context, "Failed to explain doc [" + hitContext.hit().getType() + "#" + hitContext.hit().getId() + "]", e); } finally { context.clearReleasables(SearchContext.Lifetime.COLLECTION); } } }
exists = Lucene.exists(context.searcher(), context.query()); } finally { context.clearReleasables(SearchContext.Lifetime.COLLECTION);