Skip to content

Commit

Permalink
fixed string list in filter of SphinxQL query log; removed qcache pro…
Browse files Browse the repository at this point in the history
…filer switch for empty doc list
  • Loading branch information
tomatolog committed Jun 23, 2023
1 parent 0a7508c commit ff87cc4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
6 changes: 3 additions & 3 deletions src/sphinxfilter.cpp
Expand Up @@ -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;

Expand Down
5 changes: 1 addition & 4 deletions src/sphinxsearch.cpp
Expand Up @@ -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<iMatches; i++ )
Expand Down Expand Up @@ -1313,10 +1313,7 @@ int ExtRanker_State_T<STATE,USE_BM25>::GetMatches ()
{
pDocs = this->GetFilteredDocs ();
if ( !pDocs )
{
this->UpdateQcache(0);
return 0;
}

pHlist = RankerGetHits ( pProfile, this->m_pRoot.get(), pDocs );
}
Expand Down

0 comments on commit ff87cc4

Please sign in to comment.