Permalink
Browse files

fixed #32 - fold_lemmas=1 vs hit count

  • Loading branch information...
glookka authored and klirichek committed Jun 5, 2017
1 parent 7d8cd87 commit 123a9f05d8bc2b367a163e01627ced20b31765ea
Showing with 37 additions and 1 deletion.
  1. +8 −0 src/sphinx.cpp
  2. +1 −1 test/test_254/model.bin
  3. +27 −0 test/test_254/test.xml
  4. +1 −0 test/test_254/wordforms.txt
@@ -16744,6 +16744,13 @@ void ISphQueryFilter::GetKeywords ( CSphVector <CSphKeywordInfo> & dKeywords, co
dKeywords.Resize ( dKeywords.GetLength()-1 );
} else
{
int iKeywordWithMaxHits = iPreAotCount;
for ( int i=iPreAotCount+1; i<dKeywords.GetLength(); i++ )
if ( dKeywords[i].m_iHits > dKeywords[iKeywordWithMaxHits].m_iHits )
iKeywordWithMaxHits = i;
CSphString sNormalizedWithMaxHits = dKeywords[iKeywordWithMaxHits].m_sNormalized;
int iDocs = 0;
int iHits = 0;
if ( m_tFoldSettings.m_bStats )
@@ -16758,6 +16765,7 @@ void ISphQueryFilter::GetKeywords ( CSphVector <CSphKeywordInfo> & dKeywords, co
dKeywords.Resize ( iPreAotCount );
dKeywords[iTokenized].m_iDocs = iDocs;
dKeywords[iTokenized].m_iHits = iHits;
dKeywords[iTokenized].m_sNormalized = sNormalizedWithMaxHits;
}
}
}
Oops, something went wrong.

0 comments on commit 123a9f0

Please sign in to comment.