Commit f0e137e5 authored by serg@serg.mysql.com's avatar serg@serg.mysql.com

follow-up correction patch for 'boolean fulltext search weighting scheme changed'

parent c64221f1
...@@ -322,7 +322,8 @@ void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig) ...@@ -322,7 +322,8 @@ void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig)
break; break;
if (yn & FTB_FLAG_YES) if (yn & FTB_FLAG_YES)
{ {
ftbe->cur_weight += weight / ftbe->ythresh; weight /= ftbe->ythresh;
ftbe->cur_weight += weight;
if (++ftbe->yesses == ythresh) if (++ftbe->yesses == ythresh)
{ {
yn=ftbe->flags; yn=ftbe->flags;
...@@ -360,7 +361,8 @@ void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig) ...@@ -360,7 +361,8 @@ void _ftb_climb_the_tree(FTB *ftb, FTB_WORD *ftbw, FT_SEG_ITERATOR *ftsi_orig)
} }
else else
{ {
ftbe->cur_weight += ftbe->ythresh ? weight/3 : weight; if (ftbe->ythresh) weight/=3;
ftbe->cur_weight += weight;
if (ftbe->yesses < ythresh) if (ftbe->yesses < ythresh)
break; break;
yn= (ftbe->yesses++ == ythresh) ? ftbe->flags : 0 ; yn= (ftbe->yesses++ == ythresh) ? ftbe->flags : 0 ;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment