Skip to content

Commit

Permalink
lets scale weights by index_weights when grouping, too
Browse files Browse the repository at this point in the history
git-svn-id: http://sphinxsearch.googlecode.com/svn/trunk@2472 8b96e2b9-35c5-2c16-bc47-5122d61876d4
  • Loading branch information
shodan committed Aug 31, 2010
1 parent 9931fdd commit bcfbff3
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/searchd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4585,8 +4585,15 @@ bool MinimizeAggrResult ( AggrResult_t & tRes, const CSphQuery & tQuery, bool bH
// groupby sorter does that automagically
pSorter->SetMVAPool ( NULL ); // because we must be able to group on @groupby anyway
ARRAY_FOREACH ( i, tRes.m_dMatches )
if ( !pSorter->PushGrouped ( tRes.m_dMatches[i] ) )
{
CSphMatch & tMatch = tRes.m_dMatches[i];

if ( tRes.m_dIndexWeights.GetLength() && tMatch.m_iTag>=0 )
tMatch.m_iWeight *= tRes.m_dIndexWeights[tMatch.m_iTag];

if ( !pSorter->PushGrouped ( tMatch ) )
iDupes++;
}
} else
{
// normal sorter needs massasging
Expand Down

0 comments on commit bcfbff3

Please sign in to comment.