From 57ccae4f5659581b1fa810819fc15f610f569327 Mon Sep 17 00:00:00 2001 From: Maxim Pimenov Date: Tue, 26 Jul 2016 16:39:21 +0300 Subject: [PATCH] [search] Clean up the leftovers in PreRanker. --- search/pre_ranker.cpp | 1 + search/ranker.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/search/pre_ranker.cpp b/search/pre_ranker.cpp index 26bc97ca02..1e6f4d836a 100644 --- a/search/pre_ranker.cpp +++ b/search/pre_ranker.cpp @@ -56,6 +56,7 @@ PreRanker::PreRanker(Index const & index, Ranker & ranker, size_t limit) void PreRanker::Init(Params const & params) { m_numSentResults = 0; + m_results.clear(); m_params = params; } diff --git a/search/ranker.cpp b/search/ranker.cpp index 8d97b95721..a8ddf30c5e 100644 --- a/search/ranker.cpp +++ b/search/ranker.cpp @@ -537,6 +537,8 @@ void Ranker::UpdateResults(bool lastUpdate) m_tentativeResults.erase(m_tentativeResults.begin(), m_tentativeResults.begin() + i); m_preResults1.clear(); + + BailIfCancelled(); m_params.m_onResults(m_results); }