From ff87cc45977a583df265427109d6a5e87a14ef8a Mon Sep 17 00:00:00 2001 From: Stas Klinov Date: Fri, 23 Jun 2023 00:13:49 +0200 Subject: [PATCH] fixed string list in filter of SphinxQL query log; removed qcache profiler switch for empty doc list --- src/sphinxfilter.cpp | 6 +++--- src/sphinxsearch.cpp | 5 +---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/sphinxfilter.cpp b/src/sphinxfilter.cpp index 162b205a18..22bfb441a1 100644 --- a/src/sphinxfilter.cpp +++ b/src/sphinxfilter.cpp @@ -2182,11 +2182,11 @@ void FormatFilterQL ( const CSphFilterSettings & f, StringBuilder_c & tBuf, int if ( f.m_bExclude ) tBuf << " NOT"; if ( f.m_eMvaFunc==SPH_MVAFUNC_ANY ) - tBuf.StartBlock ( ", '", " ANY ('", "')" ); + tBuf.StartBlock ( "', '", " ANY ('", "')" ); else if ( f.m_eMvaFunc==SPH_MVAFUNC_ALL ) - tBuf.StartBlock ( ", '", " ALL ('", "')" ); + tBuf.StartBlock ( "', '", " ALL ('", "')" ); else - tBuf.StartBlock ( ", '", " IN ('", "')" ); + tBuf.StartBlock ( "', '", " IN ('", "')" ); for ( const auto &sString : f.m_dStrings ) tBuf << sString; diff --git a/src/sphinxsearch.cpp b/src/sphinxsearch.cpp index b89fa6ef0c..61066e671b 100644 --- a/src/sphinxsearch.cpp +++ b/src/sphinxsearch.cpp @@ -747,7 +747,7 @@ void ExtRanker_c::Reset ( const ISphQwordSetup & tSetup ) void ExtRanker_c::UpdateQcache ( int iMatches ) { - if ( m_pQcacheEntry ) + if ( m_pQcacheEntry && iMatches ) { CSphScopedProfile tProf ( m_pCtx->m_pProfile, SPH_QSTATE_QCACHE_UP ); for ( int i=0; i::GetMatches () { pDocs = this->GetFilteredDocs (); if ( !pDocs ) - { - this->UpdateQcache(0); return 0; - } pHlist = RankerGetHits ( pProfile, this->m_pRoot.get(), pDocs ); }